Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-12-12 12:26:57

graph
Member
Registered: 2011-12-12
Posts: 5

[Solved] Keep panel at desktop level

Hello there.

I'm normally a fluxbox guy, but are supporting my parents' Xubuntu installation.

In fluxbox I have the option to but a certain window or panel at the desktop level, which is lovely, because your panels won't pop-over your windows all the time.

Is there any way to make a panel stay behind all windows all the time? So that you would have to minimize all windows to use it?

Offline

#2 2011-12-12 15:00:37

xulops
Member
Registered: 2011-12-06
Posts: 7

Re: [Solved] Keep panel at desktop level

Hello,

have a look on wmctrl.

"wmctrl -l" give you the list of open windows, and the desktop level (typicaly 0, 1, 2 ...). Xfce-panel for exemple has a -1 desktop level.
wmctrl -r <WIN> -t <DESK>   Move the window to the specified desktop. Maybee it works with -1.

(sorry for my poor english, i'm french)

Offline

#3 2011-12-12 18:55:47

graph
Member
Registered: 2011-12-12
Posts: 5

Re: [Solved] Keep panel at desktop level

Hmm. The -r switch will only move the given window/object to a specified desktop, which is not what I'm looking for.

I don't want to send my panel to a specified desktop, I want to make it stay below all other windows as a dock.

But thank you for your answer anyway:-)

Offline

#4 2011-12-12 19:45:20

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,136

Re: [Solved] Keep panel at desktop level

This seems to work:

wmctrl -l

0x01600004 -1 xubi xfce4-panel
0x01800003 -1 xubi Desktop
0x01600034 -1 xubi xfce4-panel
0x03800002 -1 xubi Conky (xubi)
0x03600002 -1 xubi Conky (xubi)
0x03200002 -1 xubi Conky (xubi)
0x03400003  0 xubi gmusicbrowser

...then

wmctrl -i -r 0x01600034 -b add,below

...makes the bottom panel not show up on top of windows. However, when I maximize the window, it still doesn't automatically cover the panel. Must be a setting for that somewhere.....

EDIT: Found it. disable-struts property. See here: http://forum.xfce.org/viewtopic.php?pid=24102#p24102

Last edited by ToZ (2011-12-16 14:22:44)

Offline

#5 2011-12-20 13:00:48

graph
Member
Registered: 2011-12-12
Posts: 5

Re: [Solved] Keep panel at desktop level

Woop-woop, I think I have the solution now.
First we do as ToZ mentioned:

wmctrl -l
wmctrl -i -r 0x0120004d -b add,below

Then we need to make sure that windows will be able to maximize over the panel. This can be done with the following command from this thread:

xfconf-query -c xfce4-panel -p /panels/panel-2/disable-struts -t bool -n -s true

It works perfectly for me now.

Last edited by graph (2011-12-20 13:06:37)

Offline

#6 2011-12-20 16:40:03

graph
Member
Registered: 2011-12-12
Posts: 5

Re: [Solved] Keep panel at desktop level

Hmm. It appears that the panels identifier can change value, so I made this quick 'n' dirty script to run at startup:

#!/bin/bash

# Wait for all panels to load
while [ "$(wmctrl -l | grep -c panel)" -lt "3" ];
do
   sleep 0.05s
done

# Determine identifier
ID=$(wmctrl -l | grep panel | sed -n 3p | awk '{ print $1 }')
# Place panel at desktop-level
wmctrl -i -r $ID -b add,below

Save the script and add it to startup programs (xfce4-session-settings). Please note that this script is focusing on hidding the third and last panel.

Last edited by graph (2011-12-20 16:48:36)

Offline

#7 2011-12-20 19:52:23

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,136

Re: [Solved] Keep panel at desktop level

Might I suggest one small change?

wmctrl -l | grep panel
0x01a00004 -1 xubi xfce4-panel
0x01a00034 -1 xubi xfce4-panel
0x042000cb  0 xubi [Solved] Keep panel at desktop level (Page 1) / Desktop / Xfce Forums - Mozilla Firefox

...it also returns any window that might have the word "panel" in it. To make sure we only get the xfce4-panel IDs, I would suggest something like:

ID=$(wmctrl -l | grep xfce4-panel$ | sed -n 3p | awk '{ print $1 }')

Offline

#8 2011-12-21 07:58:02

graph
Member
Registered: 2011-12-12
Posts: 5

Re: [Solved] Keep panel at desktop level

Hmm yeah, you're right. However, I don't have any other programs starting with "panel" in the name, so it's not a problem for me, since I only run the script at start-up.

Thanks for all of your help, both of you.

Last edited by graph (2011-12-21 07:58:22)

Offline

Board footer

Powered by FluxBB