From 6f680ecc48f1c52482f56f73099a5f7047c8c46d Mon Sep 17 00:00:00 2001 From: pyrschtjag Date: Tue, 11 Aug 2026 20:35:22 +0400 Subject: [PATCH] fix: powermenu --- rofi/rofi-filter | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rofi/rofi-filter b/rofi/rofi-filter index 5577f04..da88c5d 100755 --- a/rofi/rofi-filter +++ b/rofi/rofi-filter @@ -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' " lock" - printf '%s\n' "󰤄 suspend" - printf '%s\n' " reboot" - printf '%s\n' "⏻ shutdown" - printf '%s\n' "󰗽 logout" + printf '%s\0info\x1flock\n' " lock" + printf '%s\0info\x1fsuspend\n' "󰤄 suspend" + printf '%s\0info\x1freboot\n' " reboot" + printf '%s\0info\x1fshutdown\n' "⏻ shutdown" + printf '%s\0info\x1flogout\n' "󰗽 logout" ;; esac