aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuminarys <kizunanohikari@gmail.com>2015-08-17 17:15:05 -0500
committerLuminarys <kizunanohikari@gmail.com>2015-08-17 17:15:05 -0500
commit7427ce89303a2f409ed651643bd8c6566217e7c5 (patch)
treee875eb57fa57be78e2a6660abd0a864117f96bb7
parent55ad6ca2689a0d859f13fcd1f52e6c9a356bcdee (diff)
Switched config loading order to prevent root access w/wlc
-rw-r--r--sway/config.c1
-rw-r--r--sway/main.c8
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) {
// should be queued for later execution
list_t *args = split_string(line, " ");
if (!is_active && (
- strcmp("workspace", args->items[0]) == 0 ||
strcmp("exec", args->items[0]) == 0 ||
strcmp("exec_always", args->items[0]) == 0 )) {
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) {
/* Signal handling */
signal(SIGCHLD, sigchld_handle);
- if (!load_config()) {
- sway_log(L_ERROR, "Errors loading config!");
- }
-
setenv("WLC_DIM", "0", 0);
if (!wlc_init(&interface, argc, argv)) {
return 1;
}
setenv("DISPLAY", ":1", 1);
+ if (!load_config()) {
+ sway_log(L_ERROR, "Error(s) loading config!");
+ }
+
wlc_run();
return 0;