blob: b919cc5a4dbb24b6bf199852036de4f6469beec6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
# adapted from dmenu_path in the original dmenu distribution
cachedir=${XDG_CACHE_HOME:-$HOME/.cache}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu2_run
else
cache=$HOME/.dmenu2_cache # if no xdg dir, fall back to dotfile in ~
fi
IFS=:
if stest2 -dqr -n "$cache" $PATH; then
stest2 -flx $PATH | sort -u | tee "$cache"
else
cat "$cache"
fi
|