Toggle panel below or above

I like to place windows so I only see the bottom half. I like to move windows almost off the screen so I can see something else.

The current trend, to make the window manager in Linux work like a cell phone, tries to block that. One of the things that really bothers me is that they try to keep the panel on top, all the time, you can't get a window over it.

Step one is to make the window manager allow you to move the window frame outside of the desktop. This is different in every window manager. In compiz, there's a setting "constrain Y" that you turn off.

The other problem is to force the panel itself into the background. In 2013, I discovered there is a common desktop standard that offers an avenue to do this. I ran this interactively to test, then scripted it up.

wmctrl -l scans the existing objects, then we find panels, and we tell the panel to go into the bottom layer or the back to the top. This has behaved a little differently over time, with new OS

I think you'll figure it out if you study these two scripts.

$ cat togglePanelAbove.sh
#!/bin/bash

wmctrl -l | grep panel | awk '{print "wmctrl -v -i -r " $1 " -b remove,below"}' | bash

wmctrl -l | grep panel | awk '{print "wmctrl -v -i -r " $1 " -b add,above"}' | bash

$ cat togglePanelBelow.sh
#!/bin/bash

wmctrl -l | grep panel | awk '{print "wmctrl -v -i -r " $1 " -b remove,above"}' | bash

wmctrl -l | grep panel | awk '{print "wmctrl -v -i -r " $1 " -b add,below"}' | bash

I have that associated to keyboard shortcuts. It has worked in compiz and openbox and xfwm4. I lately see trouble in xfce4 that they are blocking my customizations that use the Super (Windows key) as a modifier. That's really frustrating. I gather it is a result of their desire to have whiskermenu, and in order to leave space for that, they are tyranically regulating our use of Super. Too dramatic, I know. They introduced a flaw by accident that will probably get worked out in time 🙂

About pauljohn

Paul E. Johnson is a Professor of Political Science at the University of Kansas. He is an avid Linux User, an adequate system administrator and C programmer, and humility is one of his greatest strengths.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply