aboutsummaryrefslogtreecommitdiff
path: root/.local/misc/custom dmenu build/dmenu_path
diff options
context:
space:
mode:
authorBlista Kanjo2023-06-21 06:35:05 -0400
committerBlista Kanjo2023-06-21 06:35:13 -0400
commitbf140b76e0d2a61cf4634131a1ceea35ad95048a (patch)
tree50759df62bc8a3fd930c73011a412808d18db947 /.local/misc/custom dmenu build/dmenu_path
parentbd5562e3c1239f17cee9cf20d647d4f5324ef345 (diff)
refactor: move misc to .local
Diffstat (limited to '.local/misc/custom dmenu build/dmenu_path')
-rwxr-xr-x.local/misc/custom dmenu build/dmenu_path13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/misc/custom dmenu build/dmenu_path b/.local/misc/custom dmenu build/dmenu_path
new file mode 100755
index 0000000..3a7cda7
--- /dev/null
+++ b/.local/misc/custom dmenu build/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