aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sway/config.c b/sway/config.c
index 4125f4cd..95d605a3 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -40,7 +40,7 @@ static char* get_config_path() {
} else {
name = "/sway/config";
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
- strcpy(temp, home);
+ strcpy(xdg_config_home, home);
strcat(temp, name);
}
if (exists(temp)) {
@@ -93,7 +93,7 @@ static char* get_config_path() {
} else {
name = "/i3/config";
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
- strcpy(temp, home);
+ strcpy(xdg_config_home, home);
strcat(temp, name);
}
if (exists(temp)) {
@@ -186,10 +186,9 @@ bool read_config(FILE *file, bool is_active) {
int temp_depth = 0; // Temporary: skip all config sections with depth
while (!feof(file)) {
- int _;
char *line = read_line(file);
- line = strip_whitespace(line, &_);
- line = strip_comments(line);
+ strip_comments(line);
+ strip_whitespace(line);
if (!line[0]) {
goto _continue;
}