2024-02-07 16:22:12 +01:00
|
|
|
#!/bin/dash
|
|
|
|
|
|
|
|
spaces (){
|
|
|
|
hyprctl workspaces -j | jq -c 'map({id: .id, windows: .windows, monitor: .monitorID}) | sort_by(.id)'
|
|
|
|
}
|
|
|
|
|
|
|
|
current (){
|
|
|
|
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
|
|
|
}
|
|
|
|
|
|
|
|
title (){
|
2024-09-11 11:06:11 +02:00
|
|
|
hyprctl activewindow -j | jq .title
|
2024-02-07 16:22:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
status (){
|
2024-09-11 11:06:11 +02:00
|
|
|
echo "{\"spaces\": $(spaces), \"current\": $(current), \"title\": $(title)}"
|
2024-02-07 16:22:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
status
|
2024-05-12 21:54:11 +02:00
|
|
|
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
2024-02-07 16:22:12 +01:00
|
|
|
status
|
|
|
|
done
|