summaryrefslogtreecommitdiff
path: root/src/dmenu/dmenu-5.4/dmenu_path
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:33:05 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:33:05 -0800
commit72aa4910006b9d2343b748ea15f587ceb8857af5 (patch)
tree47687d99b378b1ba7fa41bd58e47b66dae2712ee /src/dmenu/dmenu-5.4/dmenu_path
parent90ebb61d9352ce5fbc04588231a8408097e0dfac (diff)
suckless includes
Diffstat (limited to 'src/dmenu/dmenu-5.4/dmenu_path')
-rwxr-xr-xsrc/dmenu/dmenu-5.4/dmenu_path13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dmenu/dmenu-5.4/dmenu_path b/src/dmenu/dmenu-5.4/dmenu_path
new file mode 100755
index 0000000..3a7cda7
--- /dev/null
+++ b/src/dmenu/dmenu-5.4/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