KhaledEmaraDev

polybar launch script

Jan 26th, 2021
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. DIR="~/.config/polybar"
  4.  
  5. # Terminate already running bar instances
  6. killall -q polybar
  7. # polybar-msg cmd quit
  8.  
  9. # Wait until the processes have been shut down
  10. while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
  11.  
  12. # Launch the bar
  13. echo "---" | tee -a /tmp/polybar.log
  14. polybar main -c "$DIR"/config.ini 2>&1 | tee -a /tmp/polybar.log & disown
  15.  
Advertisement
Add Comment
Please, Sign In to add comment