Polybar: Tighten up launch script
This commit is contained in:
parent
68cde74a8b
commit
380a132519
@ -47,12 +47,10 @@ step_spawn_primary() {
|
||||
step_spawn_secondary() {
|
||||
# Spawn more for each secondary
|
||||
log "Spawning secondary bars"
|
||||
export secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}')
|
||||
if [ "$secondary_monitors" == "" ]; then
|
||||
return 0
|
||||
fi
|
||||
local secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}')
|
||||
[ -z "$secondary_monitors" ] && return 0
|
||||
for monitor in $secondary_monitors; do
|
||||
PB_MONITOR=$monitor
|
||||
export PB_MONITOR=$monitor
|
||||
polybar -r secondary &
|
||||
polybar -r secondary-2 &
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user