From 28053de1b28721e39a74e2190d75183c700acdc9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 22 May 2014 15:58:27 +0200 Subject: 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) --- src/events.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/events.c') 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"); -- cgit v1.2.3