Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. sleep 1
  3.  
  4. # Terminate already running bar instances
  5. killall -q polybar
  6.  
  7. # Wait until the processes have been shut down
  8. while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
  9.  
  10. #Launch bar1 and bar2
  11. if type "xrandr"; then
  12. for m in $(polybar --list-monitors | cut -d":" -f1); do
  13. # for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
  14. MONITOR=$m polybar --reload example &
  15. done
  16. else
  17. polybar --reload example &
  18. fi
  19.  
  20. #for m in $(polybar --list-monitors | cut -d":" -f1); do
  21. # MONITOR=$m polybar --reload example &
  22. #done
  23. echo "Bars launched..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement