nixos-config/home-manager/wayland/eww/scripts/get-active-workspace

5 lines
274 B
Plaintext
Raw Permalink Normal View History

2024-05-11 19:17:30 -04:00
#!/usr/bin/env bash
hyprctl monitors -j | jaq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
2024-05-11 19:17:30 -04:00
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'