diff options
author | 2015-08-15 20:13:18 -0500 | |
---|---|---|
committer | 2015-08-15 20:13:18 -0500 | |
commit | 64a971882a7b3925ed69399c7ea1dc8177f8e295 (patch) | |
tree | cc8ffeb1d52d770548fd99a9d0b7bbef18f90ead | |
parent | Merge pull request #36 from Luminarys/master (diff) | |
download | sway-64a971882a7b3925ed69399c7ea1dc8177f8e295.tar.gz sway-64a971882a7b3925ed69399c7ea1dc8177f8e295.tar.zst sway-64a971882a7b3925ed69399c7ea1dc8177f8e295.zip |
Minor fix to config loading
-rw-r--r-- | sway/config.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/config.c b/sway/config.c index 4f576bb9..17a75fbf 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -76,7 +76,7 @@ static char* get_config_path() { | |||
76 | //Now fall back to i3 paths and try the same thing | 76 | //Now fall back to i3 paths and try the same thing |
77 | name = "/.i3/config"; | 77 | name = "/.i3/config"; |
78 | sway_log(L_DEBUG, "Trying to find config in ~/.i3/config"); | 78 | sway_log(L_DEBUG, "Trying to find config in ~/.i3/config"); |
79 | char *temp = malloc(strlen(home) + strlen(name) + 1); | 79 | temp = malloc(strlen(home) + strlen(name) + 1); |
80 | strcpy(temp, home); | 80 | strcpy(temp, home); |
81 | strcat(temp, name); | 81 | strcat(temp, name); |
82 | if (exists(temp)) { | 82 | if (exists(temp)) { |
@@ -84,7 +84,6 @@ static char* get_config_path() { | |||
84 | } | 84 | } |
85 | 85 | ||
86 | sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_HOME/i3/config"); | 86 | sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_HOME/i3/config"); |
87 | char *xdg_config_home = getenv("XDG_CONFIG_HOME"); | ||
88 | if (xdg_config_home == NULL) { | 87 | if (xdg_config_home == NULL) { |
89 | sway_log(L_DEBUG, "Falling back to ~/.config/i3/config"); | 88 | sway_log(L_DEBUG, "Falling back to ~/.config/i3/config"); |
90 | name = "/.config/i3/config"; | 89 | name = "/.config/i3/config"; |
@@ -108,7 +107,6 @@ static char* get_config_path() { | |||
108 | } | 107 | } |
109 | 108 | ||
110 | sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_DIRS"); | 109 | sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_DIRS"); |
111 | char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS"); | ||
112 | if (xdg_config_dirs != NULL) { | 110 | if (xdg_config_dirs != NULL) { |
113 | list_t *paths = split_string(xdg_config_dirs, ":"); | 111 | list_t *paths = split_string(xdg_config_dirs, ":"); |
114 | name = "/i3/config"; | 112 | name = "/i3/config"; |