12 lines
392 B
Bash
Executable File
12 lines
392 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
spaces (){
|
|
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
|
seq 1 4 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
|
|
}
|
|
|
|
spaces
|
|
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
|
spaces
|
|
done
|