dotfiles/.config/eww/scripts/get-active-workspace
2025-04-29 10:10:17 -05:00

9 lines
243 B
Bash
Executable file

#!/usr/bin/env bash
active (){
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
}
socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
active
done