Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-08-21 07:43:36

omnipotent
Member
Registered: 2018-08-21
Posts: 1

Pinned Panels

Hey guys,

Just wondering if it's possible to pin a panel to a specific workspace?
So I only see that panel when i navigate to that workspace?

Thanks

Offline

#2 2018-08-21 15:04:28

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

Re: Pinned Panels

Hello and welcome.

Unfortunately, this functionality does not exist. However, have a look at https://forum.xfce.org/viewtopic.php?id=12223 for a script that uses xfpanel-switch to switch panel layouts between workspaces (which would give you the same result).


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 2018-08-21 18:00:57

Misko_2083
Member
Registered: 2015-10-13
Posts: 191
Website

Re: Pinned Panels

Scripting can help here.

From my experiance xfpanel-switch can be slow sometimes.

What could be faster is to set the panels one on top of the other and the use xdotool in a script to map/unmap the panels.
But that requires some planing and scripting.

The panels would take slightly more memory but the change would be almost instant.

If the panels are the same or similar height the icons on the desktop wouldn't move.
The icons in xfce move whenever the _NET_WORKAREA property of the root window changes, and it changes whenever the panel struts (reserved space for panels) change. In other words, when the panel preferences are open (extra pixel is added), the panel size/autohide is changed... Possibly even when the monitor us plugged/unplugged.


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#4 2018-08-21 18:24:47

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

Re: Pinned Panels

@Misko_2083, good point about the same panel size and desktop icons, though. Something else to consider if you don't want desktop icons re-arranging themselves with every workspace change.

Here is a script that I threw together a while ago that uses the built-in panel auto-hide functionality (see: https://forum.xfce.org/viewtopic.php?pid=44846#p44846.

The problem here is that some panel elements, e.g. notification area, can only exist on one panel.


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 2018-08-21 20:33:28

Misko_2083
Member
Registered: 2015-10-13
Posts: 191
Website

Re: Pinned Panels

ToZ wrote:

@Misko_2083, good point about the same panel size and desktop icons, though. Something else to consider if you don't want desktop icons re-arranging themselves with every workspace change.

The only way to prevent the icons from rearranging when the panel resizes is to force the _NET_WORKAREA to stay the same.
The bad thing is that the icons will stay behind the panel if the panel is moved/resized.

I have a monitor 1920x1080p with the _NET_WORKAREA root window property 1920x1049:
_NET_WORKAREA, x, y, width, height

x and y is the top-left position.

xprop -root  _NET_WORKAREA
_NET_WORKAREA(CARDINAL) = 0, 0, 1920, 1049

So, to keep the same  workarea,
every time the workarea changes it will be set to 0,0,1920,1049

xprop -root -spy _NET_WORKAREA \
 | while read first && read second; do
    xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA  0,0,1920,1049
done

Explanation:
xprop -root -spy _NET_WORKAREA  # Monitors for changes of root window's property
while read first && read second... # this way we will prevent the deadlock of xfdesktop
                                           # on every second line the loop executes the line below
xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA  0,0,1920,1049  # Sets the workarea

The icons will not move if the panels are resized.


I've noticed that it takes 10-15 seconds for the icon location to be saved, so, when moving the icons one has to wait some time and then resize the panel. That way the moved icons will not relocate on panel resize/move,

---------------------------------------------------------------------------

ToZ wrote:

Here is a script that I threw together a while ago that uses the built-in panel auto-hide functionality (see: https://forum.xfce.org/viewtopic.php?pid=44846#p44846.

The problem here is that some panel elements, e.g. notification area, can only exist on one panel.

Nice script.

If some panel elements exist only on one panel, maybe that panel can be reserved to stay on all the workspaces like 20% in size. The rest 80% would be other panels. Of course with the option "Autmatically increase the lenghth" off in all the panels.

-------------------------------------------------------------------------

I wonder if there is something that can be done to prevent the icons from rearranging at login
Watching at $HOME/.config/xfce4/desktop width with inotifywait command (inotify-tools package)

inotifywait -m $HOME/.config/xfce4/desktop -e create -e moved_to \
 | while read path action file; do 
          echo "The file '$file' appeared in directory '$path' via '$action'"
done

The icons are saved every now and then when they are moved but happens when the panel is resized as well.

# Edit I had some issues with copy/pasting the code, The pipes characters were missing in this post, fixed now.

Last edited by Misko_2083 (2018-08-21 21:45:28)


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

Board footer

Powered by FluxBB