1

I'm using the Cinnamon desktop environment (on Debian Sid), whose window manager has no option to, let's say so, undecorate an application window.

As I see that a number of programs manage to tell the above window manager that they will provide frames and whatsnot on their own (e.g., google chrome), I wonder if it exists, or can be written, a wrapper to be called like this

$ noframes mupdf my16:9slides.pdf

that starts, tell the window manager not to worry about frames etc, starts my application and reparents it.

The (maybe marginal) benefit is that the window aspect ratio, in my example, will be more approximately equal to 16:9 and the window will fit almost exactly the available space when using the zoom to 1/4 screen feature.

PS: from my .twmrc

NoTitle {"mupdf" ...}
1

May be you can disable/enable you title bar with this code:

#!/usr/bin/python2
from gtk.gdk import *

w=window_foreign_new((get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0])

if w.get_decorations() == 0 :
    w.set_decorations(DECOR_ALL)
else:
    w.set_decorations(0)

window_process_all_updates()

It comes from this gist. That is based on this post about removing decoration on specific WMs.
As it is mentioned in the article, you can create a shortcut to remove decoration of the windows you are interested in.

In the Cinnamon Keyboard Shorcuts, bind a sequence (I use Super+U) to that script, providing it is executable and in the your PATH. On an active windows, hit the sequence and it will remove the decoration. Hit it again and it will come back.

  • (1) there is one open parenthesis too much in =window_foreign_new((get... and (2) there is a minor glitch, I have to invoke the script two times when I use it for the first time on a window, the following times it toggles the decoration in the expected manner. I wonder if you can help also with this issue,,, – gboffi Nov 26 '17 at 23:21
  • Sometimes the script acts on another window... whatever: until someone comes out with the perfect script, your answer is the accepted one. – gboffi Nov 26 '17 at 23:43
  • Re the wrong action the 1st time the script is used, I've checked and .get_decorations() on a Cinnamon decorated window returns 0!!! The script sets (again) the decoration and now, the next time, get_decorations() returns a non-zero code, so the window gets undecorated etc etc. Why 0 the 1st time? Who knows. – gboffi Nov 26 '17 at 23:53
1

I have no installation to test this, but it seems there might be a "Cinnamon Maximus" extension that removes decorations from fullscreen windows, if your application can go fullscreen, albeit with borders.

Aternatively, you might try something radical like setting the window's overrideredirect flag. This asks the window manager not to manage the window. Then re-parenting the window to the root window. Beware, you may not be able to get out of this fullscreen mode, so make sure you can exit the application somehow.

For example, run xlogo, get the root window id, and use xdotool to change the xlogo setting:

$ xlogo &
$ xwininfo -root | grep id:
xwininfo: Window id: 0xc1 (the root window) (has no name)
$ xdotool search xlogo  set_window --overrideredirect 1  windowreparent 0xc1
  • About Cinnamon Maximus, in 1st place it was not updated recently and as such it is not compatible with the current version of cinnamon, but I think it is not, however, what I want. If I understand the description, it strips the decoration from maximized windows, while I want to undecorate a normal window. At any rate, C-M shows that what I want can be done... Coming to the second part of your answer, well you said "radical" and radical it is indeed, I would like to be able to manage (move, resize, iconify) my undecorated window using Alt-Button1 etc. Thank you anyway – gboffi Apr 6 '16 at 20:11
  • Can you use xdotool windowmove and xdotool windowsize to grow the window to be bigger than the screen, and place the borders off-screen so that the important part occupies the whole real screen? – meuh Apr 6 '16 at 21:04
  • I would prefer not to. – gboffi Apr 7 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.