nixos-config/home-manager/wayland/eww/scripts/get-active-workspace
Kiana Sheibani 264fc1406d
tweak: switch from jaq to jq
`jaq` is not really better than `jq`, and it's more useful to have
the more popular version in my environment.
2025-03-07 21:28:04 -05:00

4 lines
273 B
Bash
Executable file

#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
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}'