aboutsummaryrefslogtreecommitdiff
path: root/.config/yambar/scripts/yambar-start.sh
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2023-10-11 18:21:52 +0100
committerJustine Smithies <justine@smithies.me.uk>2023-10-11 18:21:52 +0100
commit786f9c22fab19de866566de4c7933aef416a1462 (patch)
tree512c3563b43a511171979604d6a2a09a4b68c50a /.config/yambar/scripts/yambar-start.sh
parentba6e0a870faa3306b1e15bd03460b2faa30ceb37 (diff)
Switched to River
Diffstat (limited to '.config/yambar/scripts/yambar-start.sh')
-rwxr-xr-x.config/yambar/scripts/yambar-start.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/.config/yambar/scripts/yambar-start.sh b/.config/yambar/scripts/yambar-start.sh
new file mode 100755
index 0000000..064d984
--- /dev/null
+++ b/.config/yambar/scripts/yambar-start.sh
@@ -0,0 +1,18 @@
+#!/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}
+ # swaymsg focus output ${monitor}
+ yambar &
+ sleep 0.2
+done
+if [ "$total" -gt "1" ]; then
+ riverctl focus-output HDMI-A-1
+ # swaymsg focus output HDMI-A-1
+fi
+exit 0