infrastructure/home/desktop/eww/config/scripts/get-active-workspace
2024-06-15 17:17:27 +02:00

7 lines
348 B
Plaintext
Executable file

# print current active workspace id
hyprctl monitors -j | jaq '.[] | select(.focused) | .activeWorkspace.id'
# print current active workspace id on workspace changes
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'