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