diff --git a/bin/omarchy-power-menu b/bin/omarchy-power-menu index 18b5367..83157ba 100755 --- a/bin/omarchy-power-menu +++ b/bin/omarchy-power-menu @@ -5,31 +5,21 @@ # Function to show power menu show_power_menu() { - local menu_options=" Lock -󰤄 Sleep -󰜉 Restart -󰐥 Shutdown" + local menu_options="\u200B Lock +\u200C󰤄 Sleep +\u200D Relaunch +\u2060󰜉 Restart +󰐥\u2063 Shutdown" # These first characters are invisible sort keys - # Show menu and get selection - local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 210) + local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 250 -O alphabetical) - if [ -n "$selection" ]; then - case "$selection" in - "󰐥 Shutdown") - systemctl poweroff - ;; - "󰜉 Restart") - systemctl reboot - ;; - "󰤄 Sleep") - systemctl suspend - ;; - " Lock") - hyprlock - ;; - *) ;; - esac - fi + case "$selection" in + *Lock*) hyprlock ;; + *Sleep*) systemctl suspend ;; + *Relaunch*) hyprctl dispatch exit ;; + *Restart*) systemctl reboot ;; + *Shutdown*) systemctl poweroff ;; + esac } # Main execution