[hackers] [dmenu] cache option in config.mk || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Fri, 7 Jan 2011 18:55:06 +0000 (UTC)

changeset: 385:13a8d1810700
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Fri Jan 07 18:54:40 2011 +0000
files: config.mk dmenu_path.c
description:
cache option in config.mk

diff -r 2b9683c50723 -r 13a8d1810700 config.mk
--- a/config.mk Wed Dec 01 20:25:10 2010 +0000
+++ b/config.mk Fri Jan 07 18:54:40 2011 +0000
@@ -1,7 +1,9 @@
 # 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
@@ -19,7 +21,7 @@
 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}
 
diff -r 2b9683c50723 -r 13a8d1810700 dmenu_path.c
--- a/dmenu_path.c Wed Dec 01 20:25:10 2010 +0000
+++ b/dmenu_path.c Fri Jan 07 18:54:40 2011 +0000
@@ -7,8 +7,6 @@
 #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);
@@ -26,7 +24,7 @@
         if(chdir(home) < 0)
                 die("chdir failed");
         if(uptodate()) {
- execlp("cat", "cat", CACHE, NULL);
+ execl("/bin/cat", "cat", CACHE, NULL);
                 die("exec failed");
         }
         scan();
Received on Fri Jan 07 2011 - 19:55:06 CET

This archive was generated by hypermail 2.2.0 : Fri Jan 07 2011 - 20:00:09 CET