aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk6
-rw-r--r--dmenu_path.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/config.mk b/config.mk
index ebaab81..08ea1bf 100644
--- a/config.mk
+++ b/config.mk
@@ -1,7 +1,9 @@
1# dmenu version 1# dmenu version
2VERSION = 4.2.1 2VERSION = 4.2.1
3 3
4# Customize below to fit your system 4# dmenu_path cache (absolute or relative to $HOME)
5CACHE = .dmenu_cache
6
5 7
6# paths 8# paths
7PREFIX = /usr/local 9PREFIX = /usr/local
@@ -19,7 +21,7 @@ INCS = -I${X11INC}
19LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} 21LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
20 22
21# flags 23# flags
22CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 24CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" -DCACHE=\"${CACHE}\" ${XINERAMAFLAGS}
23CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} 25CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
24LDFLAGS = -s ${LIBS} 26LDFLAGS = -s ${LIBS}
25 27
diff --git a/dmenu_path.c b/dmenu_path.c
index 8df2667..407477a 100644
--- a/dmenu_path.c
+++ b/dmenu_path.c
@@ -7,8 +7,6 @@
7#include <unistd.h> 7#include <unistd.h>
8#include <sys/stat.h> 8#include <sys/stat.h>
9 9
10#define CACHE ".dmenu_cache"
11
12static void die(const char *s); 10static void die(const char *s);
13static int qstrcmp(const void *a, const void *b); 11static int qstrcmp(const void *a, const void *b);
14static void scan(void); 12static void scan(void);
@@ -26,7 +24,7 @@ main(void) {
26 if(chdir(home) < 0) 24 if(chdir(home) < 0)
27 die("chdir failed"); 25 die("chdir failed");
28 if(uptodate()) { 26 if(uptodate()) {
29 execlp("cat", "cat", CACHE, NULL); 27 execl("/bin/cat", "cat", CACHE, NULL);
30 die("exec failed"); 28 die("exec failed");
31 } 29 }
32 scan(); 30 scan();