mirror of git://git.suckless.org/dmenu
cache option in config.mk
This commit is contained in:
parent
a8ea79715f
commit
d515d2758f
|
@ -1,7 +1,9 @@
|
||||||
# dmenu version
|
# dmenu version
|
||||||
VERSION = 4.2.1
|
VERSION = 4.2.1
|
||||||
|
|
||||||
# Customize below to fit your system
|
# dmenu_path cache (absolute or relative to $HOME)
|
||||||
|
CACHE = .dmenu_cache
|
||||||
|
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@ -19,7 +21,7 @@ INCS = -I${X11INC}
|
||||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
|
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
|
||||||
|
|
||||||
# flags
|
# 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}
|
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS = -s ${LIBS}
|
LDFLAGS = -s ${LIBS}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#define CACHE ".dmenu_cache"
|
|
||||||
|
|
||||||
static void die(const char *s);
|
static void die(const char *s);
|
||||||
static int qstrcmp(const void *a, const void *b);
|
static int qstrcmp(const void *a, const void *b);
|
||||||
static void scan(void);
|
static void scan(void);
|
||||||
|
@ -26,7 +24,7 @@ main(void) {
|
||||||
if(chdir(home) < 0)
|
if(chdir(home) < 0)
|
||||||
die("chdir failed");
|
die("chdir failed");
|
||||||
if(uptodate()) {
|
if(uptodate()) {
|
||||||
execlp("cat", "cat", CACHE, NULL);
|
execl("/bin/cat", "cat", CACHE, NULL);
|
||||||
die("exec failed");
|
die("exec failed");
|
||||||
}
|
}
|
||||||
scan();
|
scan();
|
||||||
|
|
Loading…
Reference in New Issue