Files
omarchy/bin/omarchy-menu-power
David Heinemeier Hansson f99277ad71 Remove needless comments
2025-07-18 23:00:42 -05:00

23 lines
541 B
Bash
Executable File

#!/bin/bash
show_power_menu() {
# The first characters are invisible sort keys.
local menu_options="\u200B Lock
\u200C󰤄 Suspend
\u200D Relaunch
\u2060󰜉 Restart
\u2063󰐥 Shutdown"
local selection=$(echo -e "$menu_options" | wofi --show dmenu --width 150 --height 195 -O alphabetical --style ~/.config/wofi/select.css)
case "$selection" in
*Lock*) hyprlock ;;
*Suspend*) systemctl suspend ;;
*Relaunch*) uwsm stop ;;
*Restart*) systemctl reboot ;;
*Shutdown*) systemctl poweroff ;;
esac
}
show_power_menu