dotfiles/de/home/.config/eww/scripts/getWorkspaces.sh
2025-03-04 16:00:03 -08:00

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
}