mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
The Reboot, Logout and Lock PUA glyphs (U+F01E, U+F08B, U+F023) were lost from the sway powermenu and rendered as blanks. Re-inject them so the menu matches the i3 version. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
30 lines
631 B
Bash
Executable File
30 lines
631 B
Bash
Executable File
#!/bin/sh
|
|
|
|
choice="$(printf "⏻ Shutdown\n Reboot\n Logout\n Lock\n⏾ Suspend" \
|
|
| rofi -dmenu \
|
|
-i \
|
|
-p "Power" \
|
|
-theme ~/.config/rofi/config.rasi \
|
|
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
|
|
|
|
[ -z "$choice" ] && exit 0
|
|
|
|
case "$choice" in
|
|
*Lock)
|
|
~/.config/sway/scripts/lockscreen
|
|
;;
|
|
*Logout)
|
|
swaymsg exit
|
|
;;
|
|
*Suspend)
|
|
~/.config/sway/scripts/lockscreen
|
|
loginctl suspend
|
|
;;
|
|
*Reboot)
|
|
loginctl reboot
|
|
;;
|
|
*Shutdown)
|
|
loginctl poweroff
|
|
;;
|
|
esac
|