From e30c67483b11bab0ae3795ef7015435489ea7833 Mon Sep 17 00:00:00 2001 From: Peter Son Struschka Date: Sun, 23 Dec 2018 21:05:24 +0700 Subject: reorganization and updates --- i3wm/.config/polybar/launch.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'i3wm/.config/polybar/launch.sh') diff --git a/i3wm/.config/polybar/launch.sh b/i3wm/.config/polybar/launch.sh index a0f26cd..e099ebb 100755 --- a/i3wm/.config/polybar/launch.sh +++ b/i3wm/.config/polybar/launch.sh @@ -6,8 +6,15 @@ killall -q polybar # Wait until the processes have been shut down while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + # Launch bar1 and bar2 -MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar & -MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar-second & +MONITOR=$(polybar -m|tail -n1|sed -e 's/:.*$//g') polybar topbar & + +MONITORS=$(polybar -m|sed -e 's/:.*$//g') +while read -r monitor; do + MONITOR=$monitor polybar topbar-second & +done <<< $MONITORS + +PRIMARY_MONITOR=$(xrandr -q|awk '/ connected primary /'|cut -d ' ' -f1) echo "Bars launched..." -- cgit v1.2.3