Skip to content

Instantly share code, notes, and snippets.

@ajashton
Created October 3, 2011 04:31
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ajashton/1258443 to your computer and use it in GitHub Desktop.
Save ajashton/1258443 to your computer and use it in GitHub Desktop.
Edit of GNOME 3's Adwaita Metacity theme to remove the titlebar when the window is maximized.
diff --git a/metacity-1/metacity-theme-3.xml b/metacity-1/metacity-theme-3.xml
index 0e285a9..52d8c54 100644
--- a/metacity-1/metacity-theme-3.xml
+++ b/metacity-1/metacity-theme-3.xml
@@ -46,17 +46,14 @@
<distance name="right_titlebar_edge" value="1"/>
</frame_geometry>
-<frame_geometry name="max" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
+<frame_geometry name="max" has_title="false" parent="normal" rounded_top_left="false" rounded_top_right="false">
<distance name="left_width" value="0" />
<distance name="right_width" value="0" />
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
- <distance name="title_vertical_pad" value="8"/> <!--
- This needs to be 1 less then the
- title_vertical_pad on normal state
- or you'll have bigger buttons -->
- <border name="title_border" left="10" right="10" top="1" bottom="2"/>
- <border name="button_border" left="0" right="0" top="0" bottom="2"/>
+ <distance name="title_vertical_pad" value="0"/>
+ <border name="title_border" left="0" right="0" top="0" bottom="0"/>
+ <border name="button_border" left="0" right="0" top="0" bottom="0"/>
<distance name="bottom_height" value="0" />
</frame_geometry>
@aykevl
Copy link

aykevl commented Mar 4, 2014

Thank you! I have made similar edits for Mint-X and DustBlue, both coming with Linux Mint Debian Edition. This gist brought me on the right track. I think it's a much more reliable option than Maximus and the like. Unfortunately, the changes get overwritten with updates to the theme (which luckily don't happen frequently).

Those looking for how to do it:
For Mint-X (/usr/share/themes/Mint-X/metacity-1/metacity-theme-1.xml):

      <frame_geometry name="normal_maximized" ... has_title="false">
        ...
        <border name="title_border" left="0" right="0" top="0" bottom="0"/>
        <border name="button_border" left="0" right="0" top="0" bottom="0"/>

For DustBlue (/usr/share/themes/DustBlue/metacity-1/metacity-theme-1.xml):

      <frame_geometry name="frame_geometry_abnormal" ... has_title="false">
        ...
        <distance name="button_width" value="0"/>
        <distance name="button_height" value="0"/>
        ...
        <border name="title_border" left="0" right="0" top="0" bottom="0"/>
        <border name="button_border" left="0" right="0" top="0" bottom="0"/>

Just change the things. Of course, don't include the ....
I tested this in MATE. They might not work in Gnome 3.

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