summaryrefslogtreecommitdiff
path: root/.config/eww/scripts
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-02-21 11:38:20 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-02-21 11:38:20 +0100
commit93e52fbbcb5f5a310a0459aab48b7a622cfdf467 (patch)
tree4b38dbaa6f440d85425ae2f6d1cea8a13927c1c7 /.config/eww/scripts
parent6e845dacb460007c0b027ef0fbd24203db4b2512 (diff)
eww: Fix active workspace listener for multi-monitor
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x.config/eww/scripts/active-workspace-listener12
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