From 7edd8ddcc82cc8e9740f0df387ddd4e26aeb7e2a Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Fri, 16 Oct 2020 22:31:55 -0400 Subject: [PATCH] fixed behavior where dmenu wasn't blocking and an empty string was being passed to the handler --- logout.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/logout.sh b/logout.sh index 3200635..63ce591 100755 --- a/logout.sh +++ b/logout.sh @@ -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