System tray - dual monitor setup - how to set which monitor to display?

G’day. I’m using bspwm with polybar - installed on the Manjaro XFCE edition. I’m loving the tiling WM. Something is puzzling me. IIUC polybar does not have a systray, however I’m seeing one showing nm-applet, power applet, pamac updates, bluetooth applet, redshift etc. It didn’t start showing up until I configured lxsession to start at bspwm login.

What I’m trying to do is set which monitor it shows up on. I have a laptop, but primary monitor is external displayport monitor. I’d like it to show up on that one, but it’s inconsistent - sometimes it does, but more often than not it shows up on the laptop screen. I’m not setting it anywhere, it just appears.

Any tips?

use something more common like i3, i very much doubt you’ll find many bspwm users.
in xfce you can even disable xfwm4 & xfdesktop, put i3 in autostart to get tiling in xfce.
or
logout & select i3 from the session menu to get a pure experience.

How do you enable your second monitor? With xrandr, you can set the HDMI output as --primary. (At least on i3 and other window managers)

E.g.:
xrandr --output DP1 --auto --primary --output eDP1 --auto --left-of DP1

(Setting the monitor connected by display port as primary and the laptop monitor to the left of it.)

You can get the correct device names with xrandr --listmonitors.

Hi,

I use bspwm with polybar too (without a systray though)

There is a systray section in the configuration page on the polybar wiki, did you check it already ?
Also you might find that video useful (helped me a lot for my dual monitor settings) https://www.youtube.com/watch?v=FAimFhf84QI

Thankyou for the replies all.

@kerry_s - I didn’t know that you could do that with XFCE - might try it, but I’m enjoying the bspwm experience. I have tried i3, but bspwm is better for me.

@mithrial - I’ve got xrandr already set up like that. Polybar and the dual monitors are working fine. It’s the systray that’s not showing up on the primary monitor.

@oguere - thanks - I’ve seen the systray section on polybar wiki. I’ll be ok setting up a new polybar that I configure. My confusion is that one has appeared and I didn’t ask it to, and I’m wondering where it came from. I’m assuming it’s from the XFCE settings somehow when I start lxsession? I’ll check that youtube video link out. Thanks.
[edit] - Checked out the youtube video, and turns out I’d already seen it. :slight_smile:

Hi. I think some bspwm setups use stalonetray for system tray, so you might check if that it is the tray you see in your case.

@kainonergon - G’day mate. Thanks for replying. I don’t have stalonetray even installed. Here are some pstree screenshots. I can’t figure this one out - feels like I’m missing something obvious.

Maybe that’s just polybar bug and not its feature. You can browse open issues about tray or multi monitor setup on polybar github page. I don’t use tray so I can’t help much here.

EDIT. You can try to start polybar from the command line and see if there are some relevant messages. Also you can get a lot of additional information on what polybar is doing with its tray using this command (substitute barname with actual bar name from your polybar config file):

polybar -l trace barname 2>&1 | grep -i tray

It prints a lot of messages, but I don’t know if they show something useful for your issue.

Thanks mate. I’m not falling on my sword over this. It’s a minor niggle, but I can live with it the way it is. I’ll have a bit more of a tinker when I get a bit more time and report back here if/when solved.

I’m a goose. Just noticed while playing around with my polybar config that the tray-position, padding, and background were all set in the section/base part of the config, rather than the bar/primary monitor section. Moved them to the primary monitor section, restarted polybar, and looks like it’s working.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.