diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-08-05 21:57:44 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-08-05 21:57:44 +0400 |
commit | 8781962d2890da6aec71a229fc9d63038149e6ce (patch) | |
tree | 4abb1443121764e20bb7f2e465048961d382543a /src/dmenu_path | |
parent | 2cb904ee0b69c6d3f5276e6842068cf765e43f7d (diff) |
directory layout changed and Makefile updated
Diffstat (limited to 'src/dmenu_path')
-rwxr-xr-x | src/dmenu_path | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dmenu_path b/src/dmenu_path new file mode 100755 index 0000000..3a7cda7 --- /dev/null +++ b/src/dmenu_path @@ -0,0 +1,13 @@ +#!/bin/sh + +cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" +cache="$cachedir/dmenu_run" + +[ ! -e "$cachedir" ] && mkdir -p "$cachedir" + +IFS=: +if stest -dqr -n "$cache" $PATH; then + stest -flx $PATH | sort -u | tee "$cache" +else + cat "$cache" +fi |