[ubuntu-studio-users] Workaround for apps that open with the window title bar hidden behind a top panel

Ralf Mardorf ralf.mardorf at alice-dsl.net
Fri Aug 25 15:30:07 UTC 2017


Hi,

IIRC it was on the Ubuntu Studio users or devel mailing list where I
wasn't the only user suffering from apps that open with the window
title bar hidden behind a top panel.

From the audio apps at least hdspmixer opens under the panel and when
using QjackCtl the "Connect" window could misbehave.

This issue shouldn't appear when using desktop environments, but is a
common issue for window managers like jwm or openbox.

I wrote a script to workaround the issue, it allows to either launch
an application and "unhide" its window automatically or to "unhide"
the active window. The script depends on the packages wmctrl and
xdotool.

It could be used for menu entries, e.g. usage with fbpanel

$ grep window2unhide .config/fbpanel/lcd-realignment | grep action
	      action = window2unhide "extcalc"
	    action = window2unhide
      action = window2unhide "hdspmixer"

and for shortcuts, e.g. usage with openbox

$ grep -B2 -A2 window2unhide .config/openbox/rc.xml 
    <keybind key="C-9">
      <action name="Execute">
        <command>window2unhide</command>
      </action>
    </keybind>

It could be configured, if the default values should be unpleasant,
temporarily e.g.

$ WINDOW2UNHIDE_SLEEP=4 WINDOW2UNHIDE_X_POS=200 WINDOW2UNHIDE_X_POS=200 window2unhide hdspmixer

for more info take a look at the comments, especially on top of the
script.

To install it's dependencies run

$ sudo apt-get update && sudo apt-get install wmctrl xdotool

(FWIW on newer releases of Ubuntu flavours you could replace "apt-get" with
"apt").

Store the script to /usr/local/bin/window2unhide and make it
executable by running

$ sudo chmod a+x /usr/local/bin/window2unhide

after that permissions should look like

$ ls -lh /usr/local/bin/window2unhide 
-rwxr-xr-x 1 root root 3.2K Aug 25 15:00 /usr/local/bin/window2unhide

Regards,
Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: window2unhide
Type: application/octet-stream
Size: 3216 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-studio-users/attachments/20170825/b0725a82/attachment.obj>


More information about the ubuntu-studio-users mailing list