Polybar: multi monitor - mono configuration

Created on 3 Jan 2017  路  3Comments  路  Source: polybar/polybar

Is there a way to be able to duplicate a single bar configuration as

[bar/top]
monitor = ${env:MONITOR:eDP-1} ${env:MONITOR:DP-1-1} ${env:MONITOR:DP-1-2}

Most helpful comment

Do this:

~ dosini
[bar/top]
monitor = ${env:MONITOR}
~

and specify the environment variable when launching the bar:

~ sh
$ MONITOR=eDP-1 polybar top &
$ MONITOR=DP-1-1 polybar top &
~

This would launch the same bar on the monitor you specify. You could also inherit from a base bar if you want to make minor changes to each bar section. This is all documented in the wiki.

All 3 comments

using "env" will not work, obviously, overriding itself
so i tried

[bar/top]
monitor = eDP-1 DP-1-1

and

[bar/top]
monitor = eDP-1, DP-1-1

not working

Do this:

~ dosini
[bar/top]
monitor = ${env:MONITOR}
~

and specify the environment variable when launching the bar:

~ sh
$ MONITOR=eDP-1 polybar top &
$ MONITOR=DP-1-1 polybar top &
~

This would launch the same bar on the monitor you specify. You could also inherit from a base bar if you want to make minor changes to each bar section. This is all documented in the wiki.

Was this page helpful?
0 / 5 - 0 ratings