diff --git a/.local/bin/sysact b/.local/bin/sysact index 64c2f320..bce603b7 100755 --- a/.local/bin/sysact +++ b/.local/bin/sysact @@ -7,13 +7,13 @@ case "$(readlink -f /sbin/init)" in *) ctl='loginctl' ;; esac -wmpid(){ # This function is needed if there are multiple instances of the window manager. +wmpid() { # This function is needed if there are multiple instances of the window manager. tree="$(pstree -ps $$)" tree="${tree#*$WM(}" echo "${tree%%)*}" } -case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in +case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off\n display select" | dmenu -i -p 'Action: ')" in '🔒 lock') slock ;; "🚪 leave $WM") kill -TERM "$(wmpid)" ;; "♻️ renew $WM") kill -HUP "$(wmpid)" ;; @@ -22,5 +22,6 @@ case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n '🔃 reboot') $ctl reboot -i ;; '🖥️shutdown') $ctl poweroff -i ;; '📺 display off') xset dpms force off ;; + ' display select') displayselect ;; *) exit 1 ;; esac