nicks-nix-config/modules/hyprland/eww-config/scripts/get-active-workspace

7 lines
263 B
Text
Raw Normal View History

2023-10-24 18:31:26 -07:00
#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'