I am running Ubuntu 16.04. I want to undecorate (remove borders and title bar) of a window. I found an old posted scripts on the net claimed to be working but it doesn't work now.
To undecorate:
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
To redecorate:
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
Though this python script works
#! /usr/bin/python2
import gtk.gdk
w = gtk.gdk.window_foreign_new( gtk.gdk.get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0] )
w.set_decorations( (w.get_decorations()+1)%2 ) # toggle between 0 and 1
gtk.gdk.window_process_all_updates()
gtk.gdk.flush()
How can I toggle window decoration from terminal without python?
This will not work in compiz! Compiz expects that
_MOTIF_WM_HINTS
property type is_MOTIF_WM_HINTS
, butxprop
command sets it toCARDINAL
. If you usexprop | grep _MOTIF_WM_HINTS
you will see this:It should be like this:
Your python script works, because GTK+ properly sets this property. :)