summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-15 21:14:59 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-15 21:14:59 -0400
commit5ed999b1101e5a5830461f56977950232a6c8106 (patch)
treecc8ffeb1d52d770548fd99a9d0b7bbef18f90ead
parentMerge pull request #36 from Luminarys/master (diff)
parentMinor fix to config loading (diff)
downloadsway-5ed999b1101e5a5830461f56977950232a6c8106.tar.gz
sway-5ed999b1101e5a5830461f56977950232a6c8106.tar.zst
sway-5ed999b1101e5a5830461f56977950232a6c8106.zip
Merge pull request #37 from Luminarys/master
Minor fix to config loading
-rw-r--r--sway/config.c4
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";