mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-29 18:58:28 -05:00
18 lines
446 B
Bash
18 lines
446 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Terminate already running bar instances
|
||
|
killall polybar
|
||
|
|
||
|
# Wait until the processes have been shut down
|
||
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||
|
|
||
|
# Launch Polybar
|
||
|
polybar --reload -c $HOME/.config/polybar/nord/config.ini mainbar &
|
||
|
|
||
|
monitor=$(xrandr --query | grep 'HDMI-2')
|
||
|
if [[ $monitor = *connected* ]]; then
|
||
|
polybar --reload -c $HOME/.config/polybar/nord/config.ini sidebar &
|
||
|
fi
|
||
|
|
||
|
echo "Polybar launched..."
|