~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/polybar/.config/polybar/launch.sh -rwxr-xr-x 533 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

# Launch bar1 and bar2
echo "---" | tee -a /var/log/polybar/polybar.log
if command -v xrandr >/dev/null; then
    for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
        MONITOR=$m polybar --reload example >>/var/log/polybar/polybar.log 2>&1 &
    done
else
    polybar --reload example >>/var/log/polybar/polybar.log 2>&1 &
fi