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