launch.sh 485 B

12345678910111213141516171819
  1. #!/bin/bash
  2. #set volume to 100
  3. pactl -- set-sink-volume 0 100%
  4. # Terminate already running bar instances
  5. killall -q polybar
  6. # Wait until the processes have been shut down
  7. while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
  8. # Launch Polybar, using default config location ~/.config/polybar/config
  9. if type "xrandr"; then
  10. for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
  11. MONITOR=$m polybar --reload example &
  12. done
  13. else
  14. polybar --reload example &
  15. fi