diff options
Diffstat (limited to '.local/bin/sway-power')
| -rwxr-xr-x | .local/bin/sway-power | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/.local/bin/sway-power b/.local/bin/sway-power index 82088ad..3d5006c 100755 --- a/.local/bin/sway-power +++ b/.local/bin/sway-power @@ -4,22 +4,25 @@ _have() { command -v "$1" } -PWR_OPTS=$(printf '%b' 'Lock\nReboot\nShutdown\nSuspend\nHibernate' | bemenu -l 5 -i -p 'Power menu:') +PWR_OPTS=$(printf '%b' 'Lock\nLogout\nReboot\nShutdown\nSuspend\nHibernate' | fuzzel -d -p 'Power menu: ') case "$PWR_OPTS" in Hibernate) - systemctl hibernate + loginctl hibernate ;; Lock) _have swaylock && swaylock --daemonize && swaymsg 'output * power off' ;; + Logout) + loginctl terminate-session self + ;; Reboot) - systemctl reboot + loginctl reboot ;; Shutdown) - systemctl poweroff + loginctl poweroff ;; Suspend) - systemctl suspend + loginctl suspend ;; esac |
