aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/eww/scripts/start.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/.config/eww/scripts/start.sh b/.config/eww/scripts/start.sh
index 628fa77..45f1946 100755
--- a/.config/eww/scripts/start.sh
+++ b/.config/eww/scripts/start.sh
@@ -5,8 +5,12 @@ eww kill
# start a bar for each monitor
monitors=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l | xargs)
-
-for ((i = 0 ; i < $monitors ; i++)); do
+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