fixed behavior where dmenu wasn't blocking and an empty string was being passed to the handler
This commit is contained in:
parent
eb51bc0e91
commit
7edd8ddcc8
1 changed files with 12 additions and 6 deletions
18
logout.sh
18
logout.sh
|
@ -20,22 +20,28 @@ printopts() {
|
||||||
handler() {
|
handler() {
|
||||||
case $1 in
|
case $1 in
|
||||||
shutdown)
|
shutdown)
|
||||||
poweroff;;
|
poweroff
|
||||||
|
;;
|
||||||
reboot)
|
reboot)
|
||||||
reboot;;
|
reboot
|
||||||
|
;;
|
||||||
suspend)
|
suspend)
|
||||||
zzz;;
|
zzz
|
||||||
|
;;
|
||||||
logout)
|
logout)
|
||||||
pkill -9 -P $(pgrep .kwin-session);;
|
pkill -9 -P $(pgrep .kwin-session)
|
||||||
|
;;
|
||||||
hibernate)
|
hibernate)
|
||||||
ZZZ;;
|
ZZZ
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
:
|
:
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
logoutMenu() {
|
logoutMenu() {
|
||||||
printopts | menu | handler
|
cmd=$(printopts | menu)
|
||||||
|
handler $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue