Remove titlebar from maximized terminal window

8,673

This should do what you want:

Copy and paste this into your favourite text editor:

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

w=window_foreign_new((get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0]))
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 :
    w.set_decorations(DECOR_ALL)
else:
    w.set_decorations(0)

if maximized: w.maximize()
window_process_all_updates()

save in your home folder with the name decoration.py

Add execute permissions:

chmod +x ~/decoration.py

Create a keyboard shortcut:

enter image description here

For the shortcut in the picture - maximize your terminal and type ALT+y to remove the window decoration in the terminal.

enter image description here

Share:
8,673

Related videos on Youtube

Jason
Author by

Jason

Full stack Python & Java web dev in sunny/snowy Maine. Other interests include geospatial data and puzzles

Updated on September 18, 2022

Comments

  • Jason
    Jason over 1 year

    I'm using XFCE on 10.10 and this is just one of those "is this even possible" type questions.

    When I have the terminal maximized, is it possible to remove the titlebar, including the close, minimize and maximize buttons?

    In essence, it'd be nice to have a fully maximized, transparent terminal overlay. I tend to use terminal text editors alot, and this would be an interesting effect.

  • Jason
    Jason over 12 years
    Just what I was looking for! Thanks! Only issue it takes two ALT-Y keypresses to get it working, but other than that...
  • Admin
    Admin over 11 years
    A nice script, thanks. It worked intermittently with foobar+wine, fixed it by commenting out all the refs to "maximixed".
  • jaorizabal
    jaorizabal over 10 years
    How could I apply this to all applications on startup?
  • Forty-Two
    Forty-Two about 10 years
    me too. all windows at startup