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