aboutsummaryrefslogblamecommitdiff
path: root/.config/eww/scripts/start.sh
blob: 45f194665a716eba3ecfe56226e02227a8e02746 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11





                                          
                                                                        



                                                                     
                        
    


                                      
#!/bin/bash

# kill any running instances if they exist
eww kill

# start a bar for each monitor
monitors=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l | xargs)
total=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l | xargs)
monitors=$(($monitors-1))
# for ((i = 0 ; i < $monitors ; i++)); do
for ((i = $monitors ; i >= 0 ; i-=1)); do 
	eww open bar${i}
done
if [ "$total" -gt "1" ]; then
	riverctl focus-output HDMI-A-1
fi