Tweak the menu options

This commit is contained in:
David Heinemeier Hansson
2025-07-06 15:11:56 -07:00
parent 49234a8a16
commit 00b621d7d7

View File

@ -5,18 +5,17 @@
# Function to show power menu # Function to show power menu
show_power_menu() { show_power_menu() {
local menu_options="󰐥 Power Off local menu_options=" Lock
󰜉 Restart
󰤄 Sleep 󰤄 Sleep
󰍃 Logout 󰜉 Restart
󰒲 Lock" 󰐥 Shutdown"
# Show menu and get selection # Show menu and get selection
local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 250) local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 250)
if [ -n "$selection" ]; then if [ -n "$selection" ]; then
case "$selection" in case "$selection" in
"󰐥 Power Off") "󰐥 Shutdown")
systemctl poweroff systemctl poweroff
;; ;;
"󰜉 Restart") "󰜉 Restart")
@ -25,17 +24,13 @@ if [ -n "$selection" ]; then
"󰤄 Sleep") "󰤄 Sleep")
systemctl suspend systemctl suspend
;; ;;
"󰍃 Logout") " Lock")
hyprctl dispatch exit
;;
"󰒲 Lock")
hyprlock hyprlock
;; ;;
*) *) ;;
;; esac
esac fi
fi
} }
# Main execution # Main execution
show_power_menu show_power_menu