# dmenu version
VERSION = 4.2.1
-# Customize below to fit your system
+# dmenu_path cache (absolute or relative to $HOME)
+CACHE = .dmenu_cache
+
# paths
PREFIX = /usr/local
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
# flags
-CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" -DCACHE=\"${CACHE}\" ${XINERAMAFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
#include <unistd.h>
#include <sys/stat.h>
-#define CACHE ".dmenu_cache"
-
static void die(const char *s);
static int qstrcmp(const void *a, const void *b);
static void scan(void);
if(chdir(home) < 0)
die("chdir failed");
if(uptodate()) {
- execlp("cat", "cat", CACHE, NULL);
+ execl("/bin/cat", "cat", CACHE, NULL);
die("exec failed");
}
scan();