aboutsummaryrefslogtreecommitdiff
path: root/.config/yambar/scripts/yambar-start.sh
diff options
context:
space:
mode:
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