Home > Uncategorized > Removing decoration in xfwm or metacity (again)

Removing decoration in xfwm or metacity (again)

Here is a simpler version of this post, using PyGTK:

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

state = w.property_get("_NET_WM_STATE")[2]
maximized='_NET_WM_STATE_MAXIMIZED_HORZ' in state and '_NET_WM_STATE_MAXIMIZED_VERT' in state
if maximized: w.unmaximize()
if w.get_decorations() == 0 :

if maximized: w.maximize()

This script can be used in XFCE thanks to xfce4-keyboard-settings:



Tags: ,
  1. Ricky B
    May 18, 2010 at 02:06

    Thanks! This works great with Compiz, too.

  2. heum
    June 28, 2011 at 00:42

    Thank you, works great with xfce 4.8.

  3. September 25, 2012 at 05:48

    this is very useful to me, i did modify it, but yeah, works great thank you so much. my changes took out the maximized checks, because i like to use it on non maximized windows, like daliclock, and also, i had to set my interpreter to python2, i dont have the libs set up right for the default interpreter, something i should do i guess, anyway, here is a link how i changed it : https://gist.github.com/3780188

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: