diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-01-07 18:54:40 +0000 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-01-07 18:54:40 +0000 |
commit | d515d2758fab55809ef9dcb9b1b8dfb18a5b1606 (patch) | |
tree | 3b20ec9ea5378ab79a063be99fcaa07d76cc3bfd | |
parent | a8ea79715fd2ca85d0b08e8255357c042029ab19 (diff) |
cache option in config.mk
-rw-r--r-- | config.mk | 6 | ||||
-rw-r--r-- | dmenu_path.c | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -1,7 +1,9 @@ | |||
1 | # dmenu version | 1 | # dmenu version |
2 | VERSION = 4.2.1 | 2 | VERSION = 4.2.1 |
3 | 3 | ||
4 | # Customize below to fit your system | 4 | # dmenu_path cache (absolute or relative to $HOME) |
5 | CACHE = .dmenu_cache | ||
6 | |||
5 | 7 | ||
6 | # paths | 8 | # paths |
7 | PREFIX = /usr/local | 9 | PREFIX = /usr/local |
@@ -19,7 +21,7 @@ INCS = -I${X11INC} | |||
19 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} | 21 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} |
20 | 22 | ||
21 | # flags | 23 | # flags |
22 | CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} | 24 | CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" -DCACHE=\"${CACHE}\" ${XINERAMAFLAGS} |
23 | CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} | 25 | CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} |
24 | LDFLAGS = -s ${LIBS} | 26 | LDFLAGS = -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 | |||
12 | static void die(const char *s); | 10 | static void die(const char *s); |
13 | static int qstrcmp(const void *a, const void *b); | 11 | static int qstrcmp(const void *a, const void *b); |
14 | static void scan(void); | 12 | static 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(); |