nicks-nix-config/modules/ewwbar/eww-config/scripts/get-workspaces

12 lines
399 B
Text
Raw Normal View History

2023-10-29 16:52:44 -07:00
#!/usr/bin/env bash
2023-10-24 18:31:26 -07:00
spaces (){
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
}
spaces
2023-10-29 18:27:21 -07:00
# socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
# spaces
# done