dot_testing/builds/utils/tmenu_run

21 lines
463 B
Plaintext
Raw Normal View History

2022-07-05 14:08:31 -05:00
#!/bin/sh
tmenu_path () {
IFS=" :"
for i in $PATH; do
for j in "$i"/*; do
[ -f "$j" ] && [ -x "$j" ] && printf "%s\n" "$j" | xargs basename
2022-07-05 14:08:31 -05:00
done
done
}
2024-07-22 01:22:27 -05:00
if [ "$(basename $0)" = "regenerate" ]; then
mkdir -p $HOME/.local/share
tmenu_path > $HOME/.local/share/tmenu_cache
xmessage "regeneration complete"
2024-07-22 01:22:27 -05:00
exit
else
2024-07-25 00:51:56 -05:00
export IS_RUNNING_IN_TMENU="yes"
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
fi