1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-26 06:08:35 +01:00
eoli3n-dotfiles/roles/eww/files/get-outputs
2023-11-08 20:50:11 +01:00

14 lines
233 B
Bash
Executable File

#!/bin/bash
function run() {
swaymsg -t get_outputs | jq -rc 'to_entries | map({name: .value.name, id: .key, active: .value.active})'
}
run
swaymsg -t subscribe '["workspace"]' --monitor | {
while read -r; do
run
done
}