summaryrefslogtreecommitdiff
path: root/.local/bin/sway-power
diff options
context:
space:
mode:
authorryukamish <[email protected]>2026-06-25 13:08:32 +0530
committerryukamish <[email protected]>2026-06-25 13:08:32 +0530
commit88ad6b51e3ed35a6c0f4e243be67b528ba991dc5 (patch)
tree6f83c2e9835800080374a4538a1b2282394bc7d1 /.local/bin/sway-power
parentfb8185dedade7fc8df343a619a893e07e682daf0 (diff)
bemenu -> fuzzel
Diffstat (limited to '.local/bin/sway-power')
-rwxr-xr-x.local/bin/sway-power13
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