18 lines
544 B
Bash
Executable file
18 lines
544 B
Bash
Executable file
#!/bin/bash
|
|
|
|
EMPTY=$(seq 1 10 | jaq -nRc '[inputs | (. | tostring)] | {(.[]): 0}')
|
|
|
|
# function to get workspaces infos and their window count
|
|
spaces (){
|
|
ACTIVES=$(hyprctl workspaces -j | jaq -c 'map({key: .id | tostring, value: .windows}) | from_entries')
|
|
echo $EMPTY $ACTIVES | jaq -src 'add | to_entries | map({id: (.key | tostring), windows: .value})'
|
|
}
|
|
|
|
# print workspaces infos
|
|
spaces
|
|
|
|
# print info on workspace changes
|
|
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
|
spaces
|
|
done
|