diff options
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | src/parser.c | 5 |
2 files changed, 8 insertions, 0 deletions
@@ -42,6 +42,9 @@ install: all @echo "Installing man page to $(DESTDIR)$(MAN_DIR)..." @mkdir -p $(DESTDIR)$(MAN_DIR) @install -m 644 $(MAN) $(DESTDIR)$(MAN_DIR)/ + @echo "Copying default configuration to $(DESTDIR)$(PREFIX)/share/sxwmrc..." + @mkdir -p "$(DESTDIR)$(PREFIX)/share" + @install -m 644 default_sxrc "$(DESTDIR)$(PREFIX)/share/sxwmrc" @echo "Installation complete." uninstall: diff --git a/src/parser.c b/src/parser.c index 1ceb7e0..a2de128 100644 --- a/src/parser.c +++ b/src/parser.c @@ -160,6 +160,11 @@ int parser(Config *cfg) goto found; } + snprintf(path, sizeof path, "/usr/local/share/sxwmrc"); + if (access(path, R_OK) == 0) { + goto found; + } + found: FILE *f = fopen(path, "r"); if (!f) { |
