diff options
| author | Peter Son Struschka <me@peter-struschka.com> | 2018-12-23 21:05:24 +0700 |
|---|---|---|
| committer | Peter Son Struschka <me@peter-struschka.com> | 2018-12-23 21:05:24 +0700 |
| commit | e30c67483b11bab0ae3795ef7015435489ea7833 (patch) | |
| tree | 9350fd6b22b68abc84c42476ec1cf0fc2576bc13 /i3wm/.config/polybar/launch.sh | |
| parent | 1297a2e0ec774a13c9900b63c2b4afbb6582a5d3 (diff) | |
| download | dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.tar.gz dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.tar.bz2 dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.tar.lz dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.tar.xz dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.tar.zst dotfiles-e30c67483b11bab0ae3795ef7015435489ea7833.zip | |
reorganization and updates
Diffstat (limited to 'i3wm/.config/polybar/launch.sh')
| -rwxr-xr-x | i3wm/.config/polybar/launch.sh | 11 |
1 files changed, 9 insertions, 2 deletions
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..." |
