diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-02-21 11:38:20 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-02-21 11:38:20 +0100 |
commit | 93e52fbbcb5f5a310a0459aab48b7a622cfdf467 (patch) | |
tree | 4b38dbaa6f440d85425ae2f6d1cea8a13927c1c7 /.config/eww | |
parent | 6e845dacb460007c0b027ef0fbd24203db4b2512 (diff) |
eww: Fix active workspace listener for multi-monitor
Diffstat (limited to '.config/eww')
-rwxr-xr-x | .config/eww/scripts/active-workspace-listener | 12 |
1 files changed, 11 insertions, 1 deletions
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 |