SHARE
TWEET

memebash

a guest Sep 21st, 2019 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2.  
  3. # Terminate already running bar instances
  4. killall -q polybar
  5.  
  6. # Wait until the processes have beeen shut down
  7. while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
  8.  
  9. # Launch bar
  10. polybar example &
  11.  
  12. my_laptop_external_monitor=$(xrandr --query | grep 'HDMI-1')
  13. if [[ $my_laptop_external_monitor = *connected* ]]; then
  14.     polybar secondary
  15. fi
  16.  
  17. echo "Bar launched..."
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top