diff options
author | 2015-08-17 17:15:05 -0500 | |
---|---|---|
committer | 2015-08-17 17:15:05 -0500 | |
commit | 7427ce89303a2f409ed651643bd8c6566217e7c5 (patch) | |
tree | e875eb57fa57be78e2a6660abd0a864117f96bb7 /sway | |
parent | Improve default config (diff) | |
download | sway-7427ce89303a2f409ed651643bd8c6566217e7c5.tar.gz sway-7427ce89303a2f409ed651643bd8c6566217e7c5.tar.zst sway-7427ce89303a2f409ed651643bd8c6566217e7c5.zip |
Switched config loading order to prevent root access w/wlc
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config.c | 1 | ||||
-rw-r--r-- | sway/main.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sway/config.c b/sway/config.c index 17a75fbf..dabbf8e5 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -201,7 +201,6 @@ bool read_config(FILE *file, bool is_active) { | |||
201 | // should be queued for later execution | 201 | // should be queued for later execution |
202 | list_t *args = split_string(line, " "); | 202 | list_t *args = split_string(line, " "); |
203 | if (!is_active && ( | 203 | if (!is_active && ( |
204 | strcmp("workspace", args->items[0]) == 0 || | ||
205 | strcmp("exec", args->items[0]) == 0 || | 204 | strcmp("exec", args->items[0]) == 0 || |
206 | strcmp("exec_always", args->items[0]) == 0 )) { | 205 | strcmp("exec_always", args->items[0]) == 0 )) { |
207 | sway_log(L_DEBUG, "Deferring command %s", line); | 206 | sway_log(L_DEBUG, "Deferring command %s", line); |
diff --git a/sway/main.c b/sway/main.c index 69224edc..aa8546e9 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -18,16 +18,16 @@ int main(int argc, char **argv) { | |||
18 | /* Signal handling */ | 18 | /* Signal handling */ |
19 | signal(SIGCHLD, sigchld_handle); | 19 | signal(SIGCHLD, sigchld_handle); |
20 | 20 | ||
21 | if (!load_config()) { | ||
22 | sway_log(L_ERROR, "Errors loading config!"); | ||
23 | } | ||
24 | |||
25 | setenv("WLC_DIM", "0", 0); | 21 | setenv("WLC_DIM", "0", 0); |
26 | if (!wlc_init(&interface, argc, argv)) { | 22 | if (!wlc_init(&interface, argc, argv)) { |
27 | return 1; | 23 | return 1; |
28 | } | 24 | } |
29 | setenv("DISPLAY", ":1", 1); | 25 | setenv("DISPLAY", ":1", 1); |
30 | 26 | ||
27 | if (!load_config()) { | ||
28 | sway_log(L_ERROR, "Error(s) loading config!"); | ||
29 | } | ||
30 | |||
31 | wlc_run(); | 31 | wlc_run(); |
32 | 32 | ||
33 | return 0; | 33 | return 0; |