So i was wondering how to show polybar on both my monitors, excuse me if this is a dumb question but i’ve been trying to figure this out for two hours and seemingly making no progress.
Welcome to the EndeavourOS Forum, I hope you enjoy your time here.
One big rule on the forum: There is no such thing as a dumb question.
I have hardly ever used Polybar, and I have never configured Polybar.
But I am sure help will be provided shortly.
Pudge
welcome to Endeavouros forum
you need 2 bar in polybar config ( one for each display ) some thing like example below.
(parts missing for simple explain )
[bar/mybar]
bottom = false
monitor = eDP-1
modules-left = datetime sep pulseaudio sep system-bluetooth-bluetoothctl
modules-center = cmus
spacing =1.0
modules-right = bspwm sep2 wired-network wlan vpn-networkmanager-status batterypbp
tray-position = none
[bar/mybar_external]
bottom = false
monitor = DP-1
modules-left = bspwm
modules-center = cmus
spacing =1.0
modules-right = keyboard sep volume
tray-position = none
- add displays to bspwmrc some thing like
bspc monitor eDP-1 -d 1 2 3 4 5
bspc monitor DP-1 -d 6 7 8 9 10
then more i guess . ( thing i need find out myself )
I use ARM laptop + just get external monitor work. This on list for me now , if desktop it prob less trouble .
no best answer . hope it help
After you have 2 polybar in the config you can launch them with their name. So with the above example you can launch them both like so:
polybar mybar && polybar mybar_external &
There are more than one ways for this.
I use one polybar config which includes one bar only, using ${env:VAR:alternate}
method for monitor
value. This needs a modified polybar script launcher.sh
with some weird intelligence .
I’ll post it later, as an example. Check this folder for my relevant settings. They are based on EndOS BSPWM edition configs, with several modifications on random issues I faced with multihead, locale and others.
A New Years gift
You may also use 2 different polybar config files, adding as parameter in separate launch commands.
I think this might give problems in one line, since in bash, it is an if statement (&&
).
It’s safer in 2 lines ending with a single &
.
bspc monitor DP-1 -d 6 7 8 9 10 ←
Maybe this will do the trick…
point out mistake in that post. i just give idea for OP . Yes you right!