now using Salmi's menu command
authorAnselm R. Garbe <arg@10kloc.org>
Wed, 30 Aug 2006 09:21:56 +0000 (11:21 +0200)
committerAnselm R. Garbe <arg@10kloc.org>
Wed, 30 Aug 2006 09:21:56 +0000 (11:21 +0200)
config.arg.h

index 41ae9b1..7a03460 100644 (file)
@@ -27,8 +27,9 @@ static Key key[] = { \
        { MODKEY|ShiftMask,             XK_Return,      spawn, \
                { .cmd = "exec uxterm -bg '#111111' -fg '#eeeeee' -cr '#eeeeee' +sb -fn '"FONT"'" } }, \
        { MODKEY,                       XK_p,           spawn, \
        { MODKEY|ShiftMask,             XK_Return,      spawn, \
                { .cmd = "exec uxterm -bg '#111111' -fg '#eeeeee' -cr '#eeeeee' +sb -fn '"FONT"'" } }, \
        { MODKEY,                       XK_p,           spawn, \
-               { .cmd = "exec `ls -lL /usr/bin /usr/X11R6/bin /usr/local/bin 2>/dev/null | " \
-                       "awk 'NF>2 && $1 ~ /^[^d].*x/ {print $NF}' | sort -u | dmenu`" } }, \
+               { .cmd = "exec \"$(IFS=:; for dir in $PATH; do " \
+                       "for file in \"$dir\"/*; do [ -x \"$file\" ] && echo \"${file##*/}\"; done; " \
+                       "done | sort -u | dmenu)\"" } }, \
        { MODKEY,                       XK_j,           focusnext,      { 0 } }, \
        { MODKEY,                       XK_k,           focusprev,      { 0 } }, \
        { MODKEY,                       XK_Return,      zoom,           { 0 } }, \
        { MODKEY,                       XK_j,           focusnext,      { 0 } }, \
        { MODKEY,                       XK_k,           focusprev,      { 0 } }, \
        { MODKEY,                       XK_Return,      zoom,           { 0 } }, \