nixos-configs/sway/scripts/lose-focus.sh
2023-05-28 19:35:37 -04:00

16 lines
286 B
Bash
Executable file

#!/bin/bash
appid="$1"
while true
do
while killall -0 blueman-manager
do
if [[ $(swaymsg -t get_tree | grep -B 39 blueman | grep "focused.: false") != "" ]]; then
killall blueman-manager
break
fi
sleep 0.1
done
sleep 0.1
done