2 cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
3 if [ -d "$cachedir" ]; then
4 cache=$cachedir/dmenu_run
6 cache=$HOME/.dmenu_cache
10 if [ "`ls -dt $PATH "$cache" | head -n 1`" != "$cache" ]; then
11 lsx $PATH | sort -u | tee "$cache" | dmenu "$@"
15 ) | read cmd && exec sh -c "$cmd"