1
0
mirror of https://github.com/eoli3n/dotfiles synced 2025-07-13 23:54:19 +02:00
eoli3n-dotfiles/roles/eww/files/get-workspaces

14 lines
253 B
Bash
Executable File

#!/bin/bash
function run() {
swaymsg -t get_workspaces --raw | jq -c 'map({name: .name | tostring, output: .output, icon: .name[2:], focused: .focused})'
}
run
swaymsg -t subscribe '["workspace"]' --monitor | {
while read -r; do
run
done
}