14 lines
266 B
Bash
Executable file
14 lines
266 B
Bash
Executable file
#!/bin/bash
|
|
|
|
function get_workspaces_info() {
|
|
output=$(swaymsg -t get_workspaces | jq 'sort_by(.num)')
|
|
echo $output
|
|
}
|
|
|
|
get_workspaces_info
|
|
|
|
swaymsg -t subscribe '["workspace"]' --monitor | {
|
|
while read -r event; do
|
|
get_workspaces_info
|
|
done
|
|
}
|