Most of systray icons only on left monitor, but I wan them on the right one

I recently bought a second monitor, and tint2 panel appeared on both monitors, which is perfect. Since the secondary (second) monitor is on the left, most of the systray icons stay there. But I want all of the systray icons to be on the right monitor, the one attached to the laptop.

$ xrandr --listmonitors
Monitors: 2
0: +*eDP-1 1920/346x1080/194+1366+0  eDP-1
1: +HDMI-1 1366/16x768/9+0+0  HDMI-1

I do not know how to fix it. There is no indication on second monitor in my current $/.config/tint2/tint2rc file

…
#-------------------------------------
119 β”‚ # Panel
120 β”‚ panel_items = PPPEPPPLTSEEPBCPP
121 β”‚ panel_size = 95% 32
122 β”‚ panel_margin = 0 0
123 β”‚ panel_padding = 0 1 1
124 β”‚ panel_background_id = 1
125 β”‚ wm_menu = 1
126 β”‚ panel_dock = 0
127 β”‚ panel_pivot_struts = 0
128 β”‚ panel_position = top center horizontal
129 β”‚ panel_layer = bottom
130 β”‚ panel_monitor = all
131 β”‚ panel_shrink = 0
132 β”‚ autohide = 0
133 β”‚ autohide_show_timeout = 0.3
134 β”‚ autohide_hide_timeout = 2
135 β”‚ autohide_height = 1
136 β”‚ strut_policy = follow_size
137 β”‚ panel_window_name = tint2
138 β”‚ disable_transparency = 0
139 β”‚ mouse_effects = 1
140 β”‚ font_shadow = 0
141 β”‚ mouse_hover_icon_asb = 99 0 10
142 β”‚ mouse_pressed_icon_asb = 100 0 0
143 β”‚ scale_relative_to_dpi = 0
144 β”‚ scale_relative_to_screen_height = 0
…
#-------------------------------------
196 β”‚ # System tray (notification area)
197 β”‚ systray_padding = 2 2 2
198 β”‚ systray_background_id = 7
199 β”‚ systray_sort = ascending
200 β”‚ systray_icon_size = 0
201 β”‚ systray_icon_asb = 100 0 0
202 β”‚ systray_monitor = 2 <<<----- this is my right monitor, I guess
203 β”‚ systray_name_filter =

I also checked this thread from Arch forum, but to no avail:

Please, any advice is very welcome!

I have no experience with a full panel stretching over 2 monitors.

I use 2 monitors mostly. And use the panel only on the primary monitor.

systray_monitor = primary

---

panel_monitor = primary

I am not sure if you can replace the systray section. It looks fixed on the right side of the panel.

Snippets

# Panel
panel_items = :PEFEFEEEEEEEEEESCP::
panel_size = 80% 44
panel_margin = 0 0
panel_padding = 1 4 4
panel_background_id = 16
wm_menu = 1
panel_dock = 0
panel_pivot_struts = 0
panel_position = top center horizontal
panel_layer = top
panel_monitor = primary
panel_shrink = 0
autohide = 0
autohide_show_timeout = 1
autohide_hide_timeout = 0.7
autohide_height = 23
strut_policy = follow_size
panel_window_name = tint2
disable_transparency = 0
mouse_effects = 0
font_shadow = 0
mouse_hover_icon_asb = 100 -1 6
mouse_pressed_icon_asb = 98 7 4
scale_relative_to_dpi = 0
scale_relative_to_screen_height = 0
#-------------------------------------
# System tray (notification area)
systray_padding = 0 2 5
systray_background_id = 16
systray_sort = ascending
systray_icon_size = 20
systray_icon_asb = 100 0 0
systray_monitor = primary
systray_name_filter = TESTTRAY

[EDIT] 0.1

You can use two different tint2rc files (one for each monitor)

Open your current tint2rc file in an editor and save it as whateveryouwant.tint2rc

Edit both the original and copy, the lines you are looking for are:
panel_items = PPPEPPPLTSEEPBCPP ; remove the S from the panel you DON'T want the systray in.
&
panel_monitor = all ; replace all with, 1 (original tint2rc) for primary, 2 (copied tint2rc) for secondary.

In ~/.config/tint2 edit β€˜tint2-sessionfile’ to include path to copied tint2rc

Reboot or logout

May require some adjustments on your end. For example, you may not need or want some stuff on either panel.

I hope this helps.

You nailed it! Thanks, @muzqs!

I guess that instead of 1, I had used primary to name the monitor.
Now everything is OK.

Thanks, @SauronsMouth

That’s a good idea that I definitely should try in the near future.