fixed behavior where dmenu wasn't blocking and an empty string was being passed to the handler

This commit is contained in:
Iris Lightshard 2020-10-16 22:31:55 -04:00
parent eb51bc0e91
commit 7edd8ddcc8
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

View file

@ -20,22 +20,28 @@ printopts() {
handler() {
case $1 in
shutdown)
poweroff;;
poweroff
;;
reboot)
reboot;;
reboot
;;
suspend)
zzz;;
zzz
;;
logout)
pkill -9 -P $(pgrep .kwin-session);;
pkill -9 -P $(pgrep .kwin-session)
;;
hibernate)
ZZZ;;
ZZZ
;;
*)
:
esac
}
logoutMenu() {
printopts | menu | handler
cmd=$(printopts | menu)
handler $cmd
}
if [ -z $1 ]; then