(Solved) Xfce dual monitor 2 systray

Forum rules
Before you post please read how to get help
Post Reply
shadow29c
Level 1
Level 1
Posts: 14
Joined: Sat Jun 16, 2012 2:37 pm

(Solved) Xfce dual monitor 2 systray

Post by shadow29c » Sat Jun 15, 2019 9:53 am

Hi,

This is my configuration:

Linux Mint 19.1 Tessa
Xfce 4.12
Intel Video Card
Dual monitor

I am using 2 panels for my dual monitor. I already have my first panel with Notification Area install but I wonder if there is a way to also have Notification Area in my second Pane? When I try to add Notification Area on panel 2, the plugin is grey out. I try to manually add the plugin in
~.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml but it seems like the config was overite after I reload xfce4-panel.

Is there a way I can add the option? I am open to any suggestion including installing a different plugin... Also, I was reading about different workspaces for each window but I don't really like that idea... So if it's possible to do that with xfce, I prefer to keep it for my last resort. If there are no other options and someone knows a good guide about it, I will appreciate a link:)

Thank you
Last edited by shadow29c on Tue Jul 02, 2019 5:03 pm, edited 1 time in total.

User avatar
secureIT
Level 3
Level 3
Posts: 150
Joined: Wed Dec 05, 2018 1:26 pm

Re: Xfce dual monitor 2 systray

Post by secureIT » Sat Jun 15, 2019 11:07 am

The notification area is limited to only one instance.
Also the systray is limited to only one instance.
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

shadow29c
Level 1
Level 1
Posts: 14
Joined: Sat Jun 16, 2012 2:37 pm

Re: Xfce dual monitor 2 systray

Post by shadow29c » Mon Jun 17, 2019 1:02 pm

Ok, Thank you for the reply. I wish there is a way to access it when my first screen is not available:(

User avatar
secureIT
Level 3
Level 3
Posts: 150
Joined: Wed Dec 05, 2018 1:26 pm

Re: Xfce dual monitor 2 systray

Post by secureIT » Mon Jun 17, 2019 3:09 pm

May be (or not ?) possible with a script.

First, you would have to determine which position in database the systray plugin has in the panel of the first monitor.

Code: Select all

xfconf-query -c xfce4-panel -p /plugins -lv
/plugins/plugin-1
(Mine is in : /plugins/plugin-12 systray)
Then a query should be made as to whether the first monitor is active.
The next step would be to delete the plugin from the panel of the first monitor ..... and paste it into another panel on the second monitor.
Therefore you have to know the number of the panel on second monitor........
Then you would have to update the output of the monitors.

But this is purely theoretic - I have not tried it yet .......

see further informations here :

https://forum.xfce.org/viewtopic.php?id=8619

If I have a lot of time, I will try to create an appropriate script and get back to you if it works.........

edit: meanwhile you can achieve it "the easy way"
right click on a free place of the systray - in the menue click on move - and drag and drop it to a panel on the second monitor........
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

shadow29c
Level 1
Level 1
Posts: 14
Joined: Sat Jun 16, 2012 2:37 pm

Re: Xfce dual monitor 2 systray

Post by shadow29c » Tue Jun 18, 2019 11:53 am

I love this idea:) I will read into it:) thank a lot:)

User avatar
secureIT
Level 3
Level 3
Posts: 150
Joined: Wed Dec 05, 2018 1:26 pm

Re: Xfce dual monitor 2 systray

Post by secureIT » Wed Jun 19, 2019 1:29 pm

I dont know if this is useful for your needs :

Another idea is „lets speak separate“ the notifications.

You can do it this way :

Add the message-display-plugin to the panel of the second monitor

Then do a restart.

Now there will be shown at the first monitor :
into notification-area: some apps, that came from autostart. (like update-manager bluetooth, e.g.)

Into the message-display-area of the panel of the second monitor stays the connection manager, and all started apps, that have native connection to this area (same as nat. conn. to notification-area) .
( regardless of wether these were started from the panel of the first monitor - or from the panel of the second monitor, or from menu.)
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
secureIT
Level 3
Level 3
Posts: 150
Joined: Wed Dec 05, 2018 1:26 pm

Re: Xfce dual monitor 2 systray

Post by secureIT » Sun Jun 30, 2019 3:13 pm

Coming back to an automated script for moving the notifications-plugin from one monitor to another.

Looked, if such script exists yet … and found one, that does the thing with a whole panel. It was originally created because of an bug.

Look at post #33 (from 13dagger) and his script in this thread :

https://forum.xfce.org/viewtopic.php?id=6440

quote:

Code: Select all

#!/bin/bash

# Check if our external monitor name is in the list connected displays
grep_output=`xrandr | grep "HDMI1 connected"`

if [ "$grep_output" != "" ]; then
    # The external monitor IS connected. Put it right of there internal and move xfce-panel there

    # Set up the displays
    xrandr --output HDMI1 --mode 1920x1080 --preferred --primary --pos 1920x0 --output eDP1 --mode 1920x1080 --pos 0x0

    # And move the panel to the external display
    xfconf-query -v -c xfce4-panel -p /panels/panel-0/output-name -s monitor-1
    xfconf-query -v -c xfce4-panel -p /panels/panel-1/output-name -s monitor-1
else
    # The external monitor IS NOT connected.
    # Update monitor settings and move xfce-panel to internal monitor.
    # This becomes necessary if the external display was connected before and is now gone this will re-setup everything for single monitor use.

    # Set up the display
    xrandr --verbose --output eDP1 --mode 1920x1080 --pos 0x0

    # And move the panel to the internal display
    xfconf-query -v -c xfce4-panel -p /panels/panel-0/output-name -s monitor-0
    xfconf-query -v -c xfce4-panel -p /panels/panel-1/output-name -s monitor-0
fi
exit
end of quote


When I analyzed the script, I thought about my „complicated“ thinking in Post #4 and came up with a new idea :

Create a little panel, that only hosts the notifications-plugin. (but dont forget to mark : „increase length automatically“)
Put it on top of the screen (left or right) of the first monitor.
Now right-click > panel > panel-preferences.
On top of the window you will see its number (every panel has its unique number)

Suppose it has the number 3:

the script-snippet for moving it to second-monitor would be :

Code: Select all

xfconf-query -v -c xfce4-panel -p /panels/panel-3/output-name -s monitor-1
and back to first monitor:

Code: Select all

xfconf-query -v -c xfce4-panel -p /panels/panel-3/output-name -s monitor-0
Try that out in the terminal.
That worked for me……...with LM 19.1 xfce

I think you can easyly modify the script from xfce-forum to your needs.

Note : To determine the monitor queries whether on- or off-state (according to the script) use this terminal query:

Code: Select all

xrandr –query
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

shadow29c
Level 1
Level 1
Posts: 14
Joined: Sat Jun 16, 2012 2:37 pm

Re: Xfce dual monitor 2 systray

Post by shadow29c » Tue Jul 02, 2019 5:02 pm

This is a pretty smart idea. I love it:) Thank you for your help. I will use the 3rd panel option:)

Post Reply

Return to “Xfce”