summaryrefslogtreecommitdiffstats
path: root/.config/polybar/launch.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/polybar/launch.sh')
-rwxr-xr-x.config/polybar/launch.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh
index f39972f..680d2e4 100755
--- a/.config/polybar/launch.sh
+++ b/.config/polybar/launch.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Terminate already running bar instances
killall -q polybar
@@ -6,9 +6,17 @@ killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
+monitors=$(polybar --list-monitors)
+
+left="HDMI-0"
+#left="HDMI1"
+center=$(printf "%s" "$monitors" | grep primary | cut -d":" -f1)
+right="DP-5"
+#right="HDMI2"
+
# Launch Polybar, using default config location ~/.config/polybar/config
-polybar left &
-polybar center &
-polybar right &
+MONITOR="$left" polybar --reload left &
+MONITOR="$center" polybar --reload center &
+MONITOR="$right" polybar --reload right &
-echo "Polybar launched..."
+echo "Polybars launched..."