fix: powermenu

This commit is contained in:
2026-08-11 20:35:22 +04:00
parent 64f84f7363
commit 6f680ecc48
+11 -11
View File
@@ -14,12 +14,12 @@ if [[ -n "$selection" ]]; then
body="${selection#*— }"
printf '%s' "$body" | wl-copy
elif [[ "$mode" == "powermenu" ]]; then
case "$selection" in
"lock") swaylock ;;
"suspend") systemctl suspend ;;
"reboot") systemctl reboot ;;
"shutdown") systemctl poweroff ;;
"logout") loginctl terminate-session "${XDG_SESSION_ID-}" ;;
case "$ROFI_INFO" in
lock) swaylock ;;
suspend) systemctl suspend ;;
reboot) systemctl reboot ;;
shutdown) systemctl poweroff ;;
logout) loginctl terminate-session "${XDG_SESSION_ID-}" ;;
esac
else
target_app=$(grep -rl "^Name=${selection}\$" /usr/share/applications/*.desktop 2>/dev/null | head -n1)
@@ -83,10 +83,10 @@ case "$mode" in
;;
powermenu)
echo -e "\0markup-rows\x1ftrue"
printf '%s\n' "<span foreground=\"#88c0d0\"></span> lock"
printf '%s\n' "<span foreground=\"#5e81ac\">󰤄</span> suspend"
printf '%s\n' "<span foreground=\"#ebcb8b\"></span> reboot"
printf '%s\n' "<span foreground=\"#bf616a\">⏻</span> shutdown"
printf '%s\n' "<span foreground=\"#b48ead\">󰗽</span> logout"
printf '%s\0info\x1flock\n' "<span foreground=\"#88c0d0\"></span> lock"
printf '%s\0info\x1fsuspend\n' "<span foreground=\"#5e81ac\">󰤄</span> suspend"
printf '%s\0info\x1freboot\n' "<span foreground=\"#ebcb8b\"></span> reboot"
printf '%s\0info\x1fshutdown\n' "<span foreground=\"#bf616a\">⏻</span> shutdown"
printf '%s\0info\x1flogout\n' "<span foreground=\"#b48ead\">󰗽</span> logout"
;;
esac