16 lines
570 B
Plaintext
Executable file
16 lines
570 B
Plaintext
Executable file
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}) | sort_by(.id | tonumber)'
|
|
}
|
|
|
|
# print workspaces infos
|
|
spaces
|
|
|
|
# print info on workspace changes
|
|
socat -u UNIX-CONNECT:/$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
|
spaces
|
|
done
|