diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-05-22 15:58:27 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-04-08 11:09:01 +0200 |
commit | 685218c5a75a1e7c84e7b5536a527cf92201121b (patch) | |
tree | c1144f66f5c1b93421fef9a31a50ac94553ed023 /src/events.c | |
parent | bc13f70153cdad3e836a3c55d2a80fc85956d5d5 (diff) |
do not depend on HOME being set
this introduces a bug in feh_wm_set_bg, which will be fixed in the next
commit (only applies when run without HOME)
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/events.c b/src/events.c index e6cf0ac..76c3e64 100644 --- a/src/events.c +++ b/src/events.c @@ -110,15 +110,14 @@ void init_buttonbindings(void) feh_set_bb(&buttons.rotate, 4, 2); home = getenv("HOME"); - if (!home) - eprintf("No HOME in environment"); - confhome = getenv("XDG_CONFIG_HOME"); if (confhome) confpath = estrjoin("/", confhome, "feh/buttons", NULL); - else + else if (home) confpath = estrjoin("/", home, ".config/feh/buttons", NULL); + else + return; conf = fopen(confpath, "r"); |