undelete dmenu_path and dmenu_run

This commit is contained in:
mrsu 2024-06-14 12:05:27 +01:00
parent fa9bdb7604
commit deb38655db
3 changed files with 15 additions and 2 deletions

2
.gitignore vendored
View File

@ -3,6 +3,4 @@
*.rej
dmenu
config.h
dmenu_path
dmenu_run
stest

13
dmenu_path Executable file
View File

@ -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

2
dmenu_run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &