Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-11-19 07:59:44

joce
Member
Registered: 2011-09-23
Posts: 8

Panel output choice from command line

I use my laptop in a number of places with docking stations/external screens. I have 2 panels which I'd like to have on different screens. However, there is little adaptability in the choice of outputs for each, and unavailability of an output when I use my laptop without an external screen seems to mess up the configuration. Existing choices which are agnostic of the exact output name are "Primary" and "Automatic", the latter corresponding AFAIK to the left-most screen in the layout.

- Is there a command line that could set the output of a panel dynamically at the same time as I call a script corresponding to a given external screen setting (typically a script calling xrandr to set the position `left-of` or `right-of` primary screen of external screen) ?

- If not, I request a feature allowing more adaptability of panel positioning, e.g. "First non primary" output in addition to "Primary" and "Automatic".

Last edited by joce (2021-11-21 16:50:35)

Offline

#2 2021-11-19 19:10:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Panel output choice from command line

Which distro and what version of Xfce are you using?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-11-20 10:11:20

joce
Member
Registered: 2011-09-23
Posts: 8

Re: Panel output choice from command line

Debian 11 bullseye with xfce 2.16.

Offline

#4 2021-11-20 12:05:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Panel output choice from command line

What does the following return:

xfce4-panel -V

On my system, it also lists the separate monitors by name:
panel-outputs.png
...allowing me to select them in addition to just Primary and Automatic. Do you get a similar listing?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2021-11-20 14:02:49

joce
Member
Registered: 2011-09-23
Posts: 8

Re: Panel output choice from command line

Yes, I do - however in the different places where I use my laptop, the name of the external screen is generally different due to different hardware being present: it can be HDMI-1, DP-1-1, DP-1-2, or DP-1-3.

So one possibility would be to have Panel 1 always on primary and have as many other Panels as locations. Even with this, I have observed in the past that this panel choice will occasionally be lost, I believe this happens when the chosen output is not available at the time of a panel restart. In those cases I believe it is reset to "Automatic", and it is not restored when chosen output is available again.

# xfce4-panel -V
xfce4-panel 4.16.2 (Xfce 4.16)

Offline

#6 2021-11-20 23:29:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Panel output choice from command line

Ok, I misunderstood. To answer the question from your original post, you can use xfconf-query to manually set the output value as required. Something like:

xfconf-query -c xsettings -p /panels/panel-NUM/output-name -s NAME

...where NUM is the panel number and NAME is the label from the dropdown.

You can also use xfce4-panel-profiles to save and load panel configurations - it looks like these also save the "output-name" variable. You can also script the loading of these profiles.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2021-11-21 16:48:49

joce
Member
Registered: 2011-09-23
Posts: 8

Re: Panel output choice from command line

Oh great, thanks, I hadn't found out about this.

It's actually

   

xfconf-query -c xfce4-panel -p /panels/panel-NUM/output-name -s NAME

but it does work fine.

Last edited by joce (2021-11-21 16:49:41)

Offline

#8 2021-11-21 17:12:03

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Panel output choice from command line

Yes. Sorry about that.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB