rework the regeneration mechanism for tmenu_run
This commit is contained in:
parent
8ed9beffba
commit
ca4515d440
|
@ -9,12 +9,11 @@ tmenu_path () {
|
|||
done
|
||||
}
|
||||
|
||||
if [ "$(basename $0)" = "regenerate" ]; then
|
||||
export IS_RUNNING_IN_TMENU="yes"
|
||||
choice=$(cat $HOME/.local/share/tmenu_cache | tmenu)
|
||||
if [ -z "$choice" ]; then
|
||||
mkdir -p $HOME/.local/share
|
||||
tmenu_path > $HOME/.local/share/tmenu_cache
|
||||
xmessage "regeneration complete"
|
||||
exit
|
||||
tmenu_path | sort > $HOME/.local/share/tmenu_cache
|
||||
else
|
||||
export IS_RUNNING_IN_TMENU="yes"
|
||||
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
|
||||
/bin/sh -c $choice &
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue