Switched config loading order to prevent root access w/wlc
This commit is contained in:
parent
55ad6ca268
commit
7427ce8930
|
@ -201,7 +201,6 @@ bool read_config(FILE *file, bool is_active) {
|
||||||
// should be queued for later execution
|
// should be queued for later execution
|
||||||
list_t *args = split_string(line, " ");
|
list_t *args = split_string(line, " ");
|
||||||
if (!is_active && (
|
if (!is_active && (
|
||||||
strcmp("workspace", args->items[0]) == 0 ||
|
|
||||||
strcmp("exec", args->items[0]) == 0 ||
|
strcmp("exec", args->items[0]) == 0 ||
|
||||||
strcmp("exec_always", args->items[0]) == 0 )) {
|
strcmp("exec_always", args->items[0]) == 0 )) {
|
||||||
sway_log(L_DEBUG, "Deferring command %s", line);
|
sway_log(L_DEBUG, "Deferring command %s", line);
|
||||||
|
|
|
@ -18,16 +18,16 @@ int main(int argc, char **argv) {
|
||||||
/* Signal handling */
|
/* Signal handling */
|
||||||
signal(SIGCHLD, sigchld_handle);
|
signal(SIGCHLD, sigchld_handle);
|
||||||
|
|
||||||
if (!load_config()) {
|
|
||||||
sway_log(L_ERROR, "Errors loading config!");
|
|
||||||
}
|
|
||||||
|
|
||||||
setenv("WLC_DIM", "0", 0);
|
setenv("WLC_DIM", "0", 0);
|
||||||
if (!wlc_init(&interface, argc, argv)) {
|
if (!wlc_init(&interface, argc, argv)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
setenv("DISPLAY", ":1", 1);
|
setenv("DISPLAY", ":1", 1);
|
||||||
|
|
||||||
|
if (!load_config()) {
|
||||||
|
sway_log(L_ERROR, "Error(s) loading config!");
|
||||||
|
}
|
||||||
|
|
||||||
wlc_run();
|
wlc_run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue