sway tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user