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