mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
Minor fix to config loading
This commit is contained in:
parent
6cc8ea29e5
commit
64a971882a
|
@ -76,7 +76,7 @@ static char* get_config_path() {
|
||||||
//Now fall back to i3 paths and try the same thing
|
//Now fall back to i3 paths and try the same thing
|
||||||
name = "/.i3/config";
|
name = "/.i3/config";
|
||||||
sway_log(L_DEBUG, "Trying to find config in ~/.i3/config");
|
sway_log(L_DEBUG, "Trying to find config in ~/.i3/config");
|
||||||
char *temp = malloc(strlen(home) + strlen(name) + 1);
|
temp = malloc(strlen(home) + strlen(name) + 1);
|
||||||
strcpy(temp, home);
|
strcpy(temp, home);
|
||||||
strcat(temp, name);
|
strcat(temp, name);
|
||||||
if (exists(temp)) {
|
if (exists(temp)) {
|
||||||
|
@ -84,7 +84,6 @@ static char* get_config_path() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_HOME/i3/config");
|
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_HOME/i3/config");
|
||||||
char *xdg_config_home = getenv("XDG_CONFIG_HOME");
|
|
||||||
if (xdg_config_home == NULL) {
|
if (xdg_config_home == NULL) {
|
||||||
sway_log(L_DEBUG, "Falling back to ~/.config/i3/config");
|
sway_log(L_DEBUG, "Falling back to ~/.config/i3/config");
|
||||||
name = "/.config/i3/config";
|
name = "/.config/i3/config";
|
||||||
|
@ -108,7 +107,6 @@ static char* get_config_path() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_DIRS");
|
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_DIRS");
|
||||||
char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS");
|
|
||||||
if (xdg_config_dirs != NULL) {
|
if (xdg_config_dirs != NULL) {
|
||||||
list_t *paths = split_string(xdg_config_dirs, ":");
|
list_t *paths = split_string(xdg_config_dirs, ":");
|
||||||
name = "/i3/config";
|
name = "/i3/config";
|
||||||
|
|
Loading…
Reference in a new issue