Skip to content

Instantly share code, notes, and snippets.

@unhammer
Created February 13, 2012 08:55
Show Gist options
  • Save unhammer/1815146 to your computer and use it in GitHub Desktop.
Save unhammer/1815146 to your computer and use it in GitHub Desktop.
toggle gtk window decorations
#! /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()
# now bind this to super-r or something
@emersonmx
Copy link

Thanks 😄

@jefferson-julio
Copy link

That's exactly what I needed, thanks.

@XiaoPanPanKevinPan
Copy link

Thanks!

BTW if it doesn't work on some specific apps, it can be solved with this manual

  1. open /etc/gdm3/daemon.conf
  2. uncomment WaylandEnable=false
  3. reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment