aboutsummaryrefslogtreecommitdiff
path: root/.config/yambar/scripts/yambar-start.sh
blob: 2ae089652131729f2fff2f0536cf5312f4e853d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

killall yambar

monitors=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }')
total=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l)

for monitor in ${monitors}; do
	riverctl focus-output ${monitor}
	yambar &
	sleep 0.2
done
if [ "$total" -gt "1" ]; then
	riverctl focus-output HDMI-A-1
fi
exit 0