1
0
Fork 0
dmenu/dmenu_run

16 lines
311 B
Text
Raw Normal View History

2007-12-22 14:20:20 +02:00
#!/bin/sh
2011-11-19 22:24:07 +02:00
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
else
cache=$HOME/.dmenu_cache
2011-10-17 04:12:33 +03:00
fi
2011-06-13 23:50:31 +03:00
(
IFS=:
2011-11-19 22:24:07 +02:00
if [ "`ls -dt $PATH "$cache" | head -n 1`" != "$cache" ]; then
lsx $PATH | sort -u | tee "$cache" | dmenu "$@"
else
dmenu "$@" < "$cache"
2011-06-13 23:50:31 +03:00
fi
2011-11-19 22:31:18 +02:00
) | exec sh