From 93e52fbbcb5f5a310a0459aab48b7a622cfdf467 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 21 Feb 2024 11:38:20 +0100 Subject: eww: Fix active workspace listener for multi-monitor --- .config/eww/scripts/active-workspace-listener | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/eww/scripts/active-workspace-listener b/.config/eww/scripts/active-workspace-listener index 8a09897..359a0f2 100755 --- a/.config/eww/scripts/active-workspace-listener +++ b/.config/eww/scripts/active-workspace-listener @@ -3,4 +3,14 @@ readonly IPC=/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock hyprctl -j activeworkspace | jq -r '.name' -socat -u UNIX-CONNECT:"$IPC" - | sed -n 's/^workspace>>//p' +socat -u UNIX-CONNECT:"$IPC" - | while read -r line +do + case "$line" in + 'workspace>>'*) + echo "${line#*'>>'}" + ;; + 'moveworkspace>>'*) + hyprctl -j activewindow | jq -r .workspace.name + ;; + esac +done -- cgit v1.2.3