dtfscript: Finally fix Polybar redirection in its service

This commit is contained in:
Salt 2018-09-27 20:26:56 -05:00
parent a0159c04a2
commit 819e5534ca

View File

@ -19,9 +19,9 @@ function start() {
fi
# Spawn bars on the primary monitor
export PB_MONITOR=$(xrandr -q | awk '/primary/{print $1}')
svc_log "Starting primary on monitor $PB_MONITOR"
polybar -r primary& >/dev/null 2>&1
polybar -r primary-2& >/dev/null 2>&1
svc_log "Starting primary bar(s) on monitor $PB_MONITOR"
polybar -r primary >/dev/null 2>/dev/null &
polybar -r primary-2 >/dev/null 2>/dev/null &
# Spawn more for each secondary
export secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}')
@ -29,10 +29,10 @@ function start() {
return 0
fi
for monitor in $secondary_monitors; do
svc_log "Starting secondary on monitor $monitor"
svc_log "Starting secondary bar(s) on monitor $monitor"
PB_MONITOR=$monitor
polybar -r secondary& >/dev/null 2>&1
polybar -r secondary-2& >/dev/null 2>&1
polybar -r secondary >/dev/null 2>/dev/null &
polybar -r secondary-2 >/dev/null 2>/dev/null &
done
return 0
}