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:
committed by
Michael Stapelberg
parent
4a3354da3b
commit
3400f0e6bd
@ -85,6 +85,15 @@ void load_configuration(const char *override_configpath) {
|
||||
OPTION_STRING(terminal);
|
||||
OPTION_STRING(font);
|
||||
|
||||
/* exec-lines (autostart) */
|
||||
if (strcasecmp(key, "exec") == 0) {
|
||||
Autostart *new = smalloc(sizeof(Autostart));
|
||||
new->command = sstrdup(value);
|
||||
TAILQ_INSERT_TAIL(&autostarts, new, autostarts);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* key bindings */
|
||||
if (strcasecmp(key, "bind") == 0) {
|
||||
#define CHECK_MODIFIER(name) \
|
||||
if (strncasecmp(walk, #name, strlen(#name)) == 0) { \
|
||||
|
Reference in New Issue
Block a user