a guest Sep 21st, 2019 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #!/usr/bin/env bash
- # Terminate already running bar instances
- killall -q polybar
- # Wait until the processes have beeen shut down
- while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
- # Launch bar
- polybar example &
- my_laptop_external_monitor=$(xrandr --query | grep 'HDMI-1')
- if [[ $my_laptop_external_monitor = *connected* ]]; then
- polybar secondary
- echo "Bar launched..."
RAW Paste Data