Remove wmenu_run script

This commit is contained in:
adnano 2024-05-02 21:40:46 -04:00
parent 41e8599392
commit 477c0419b4
2 changed files with 0 additions and 37 deletions

View file

@ -33,8 +33,6 @@ rt = cc.find_library('rt')
subdir('protocols') subdir('protocols')
subdir('docs') subdir('docs')
install_data('wmenu_run', install_dir: get_option('bindir'))
executable( executable(
'wmenu', 'wmenu',
files( files(

View file

@ -1,35 +0,0 @@
#!/bin/sh
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
cache="$cachedir/wmenu_run"
[ -d "$cachedir" ] || mkdir -p "$cachedir"
uptodate() {
[ -f "$cache" ] || return 1
IFS=:
for path in $PATH; do
# non-POSIX
test "$path" -nt "$cache" && return 1
done
return 0
}
bins() {
IFS=:
for path in $PATH; do
for bin in "$path"/*; do
[ -x "$bin" ] && echo "${bin##*/}"
done
done
}
path() {
if uptodate; then
cat "$cache"
else
bins | sort -u | tee "$cache"
fi
}
path | wmenu "$@" | ${SHELL:-"/bin/sh"} &