Implement autostart using "exec" in config

Syntax is "exec <application>", like when creating a binding.
Multiple entries are possible, applications are started in
the specified order.
This commit is contained in:
Michael Rudolf
2009-03-29 14:53:48 +02:00
committed by Michael Stapelberg
parent 4a3354da3b
commit 3400f0e6bd
4 changed files with 31 additions and 0 deletions

View File

@ -52,6 +52,9 @@ Display *xkbdpy;
/* The list of key bindings */
struct bindings_head bindings = TAILQ_HEAD_INITIALIZER(bindings);
/* The list of exec-lines */
struct autostarts_head autostarts = TAILQ_HEAD_INITIALIZER(autostarts);
/* This is a list of Stack_Windows, global, for easier/faster access on expose events */
struct stack_wins_head stack_wins = SLIST_HEAD_INITIALIZER(stack_wins);
@ -527,6 +530,13 @@ int main(int argc, char *argv[], char *env[]) {
}
}
/* Autostarting exec-lines */
Autostart *exec;
TAILQ_FOREACH(exec, &autostarts, autostarts) {
LOG("auto-starting %s\n", exec->command);
start_application(exec->command);
}
/* check for Xinerama */
LOG("Checking for Xinerama...\n");
initialize_xinerama(conn);