14 lines
278 B
Bash
Executable file
14 lines
278 B
Bash
Executable file
#!/bin/bash
|
|
|
|
function get_window_name() {
|
|
output=$(swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.focused==true).name')
|
|
echo $output
|
|
}
|
|
|
|
get_window_name
|
|
|
|
swaymsg -t subscribe '["window"]' --monitor | {
|
|
while read -r event; do
|
|
get_window_name
|
|
done
|
|
}
|