sway tweaks

This commit is contained in:
Henrik Bakken
2026-10-07 13:28:46 +02:00
parent 43edbad2f6
commit 13382f42fa
2 changed files with 33 additions and 28 deletions
+29 -22
View File
@@ -1,6 +1,7 @@
#!/bin/bash
SELECTION="$(printf "󰌾 Lock\n󰤄 Suspend\n󰍃 Log out\n Reboot\n Reboot to UEFI\n󰐥 Shutdown" | fuzzel --dmenu -a top-right -l 6 -w 18 -p "Select an option: ")"
[[ -z "$SELECTION" ]] && exit 0
confirm_action() {
local action="$1"
@@ -9,26 +10,32 @@ confirm_action() {
}
case $SELECTION in
*"󰌾 Lock"*)
gtklock;;
*"󰤄 Suspend"*)
if confirm_action "Suspend"; then
systemctl suspend-then-hibernate
fi;;
*"󰍃 Log out"*)
if confirm_action "Log out"; then
swaymsg exit
fi;;
*" Reboot"*)
if confirm_action "Reboot"; then
systemctl reboot
fi;;
*" Reboot to UEFI"*)
if confirm_action "Reboot to UEFI"; then
systemctl reboot --firmware-setup
fi;;
*"󰐥 Shutdown"*)
if confirm_action "Shutdown"; then
systemctl poweroff
fi;;
*"󰌾 Lock"*)
gtklock
;;
*"󰤄 Suspend"*)
if confirm_action "Suspend"; then
systemctl suspend-then-hibernate
fi
;;
*"󰍃 Log out"*)
if confirm_action "Log out"; then
swaymsg exit
fi
;;
*" Reboot"*)
if confirm_action "Reboot"; then
systemctl reboot
fi
;;
*" Reboot to UEFI"*)
if confirm_action "Reboot to UEFI"; then
systemctl reboot --firmware-setup
fi
;;
*"󰐥 Shutdown"*)
if confirm_action "Shutdown"; then
systemctl poweroff
fi
;;
esac