Customizing Window Borders


Recommended Posts

I'm new to this whole customizing linux thing, and I've been trying to figure out how to customize a gnome theme (using moomex) so the title bar text is left aligned.

I looked in the skin's xml file but I'm not really sure what to look for. I tried searching ubuntu's and gnomelooks forums, but had no luck.

If anyone has any ideas, I'd appreciate it.

post-1912-1228741880_thumb.jpg

Link to comment
Share on other sites

Start gconf-editor from the console (a Regedit-like tool to configure the innards of Gnome). Note: I don't know if Ubuntu installs it by default, you may have to apt-get it first.

Then have a look under Apps -> Metacity. There could be a Gconf key which lets you set the window title alignment.

Link to comment
Share on other sites

I can't test this, as I'm currently at work, but I think you need to change these values. You can probably just change max to min.

<draw_ops name="title-text-focused">
<title color="#ffffff" x="(3 `max` (width-title_width)) / 2" y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

<draw_ops name="title-text-unfocused">
<title color="#ffffff" x="(3 `max` (width-title_width)) / 2" y="((height - title_height) / 2) `max` 0"/>
</draw_ops>

EDIT: in the metacity-theme-1.xml file

Edited by rson451
Link to comment
Share on other sites

I can't test this, as I'm currently at work, but I think you need to change these values. You can probably just change max to min.

<draw_ops name="title-text-focused">
<title color="#ffffff" x="(3 `max` (width-title_width)) / 2" y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

<draw_ops name="title-text-unfocused">
<title color="#ffffff" x="(3 `max` (width-title_width)) / 2" y="((height - title_height) / 2) `max` 0"/>
</draw_ops>

EDIT: in the metacity-theme-1.xml file

That didn't seem to work, unless I did it wrong.

Link to comment
Share on other sites

That didn't seem to work, unless I did it wrong.

I just tested on a different theme in a VM at work (the theme you posted is completely broken for me for whatever reason). I made similar edits on Bluecurve and the text has moved to the left for me. I simply searched for anything labeled title_text* and changed all values of `max` to `min` in the x attribute. You could probably just change the entire expression to 0 instead, but at least changing max to min leaves an easy backout if it fails.

Link to comment
Share on other sites

No luck, I changed it to 0 and 1, also even tried removing x="" completely, no luck it stays centered.

Btw, I'm changing themes to see if the changes take place, I've even logged off and back on a few times.

Link to comment
Share on other sites

Copy paste this to your file:

<!-- ::: TITLES ::: -->
<draw_ops name="title-text-focused">
  <title color="#ffffff"
		 x="(3 `max` (width-title_width)) / 100"
		 y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

<draw_ops name="title-text-unfocused">
  <title color="#ffffff"
		 x="(3 `max` (width-title_width)) / 100"
		 y="((height - title_height) / 2) `max` 0"/>
</draw_ops>

Then run:

metacity-message reload-theme

You will get something like this (I'm using custom colors on the theme):

post-52106-1228756819.png

The way metacity theming works is messy, messy...

EDIT: and here is the edited file:

metacity_theme_1.zip

Edited by Lechio
Link to comment
Share on other sites

:huh:

Are you sure it's metacity you are running as a window manager?

And what theme file are you editing? Should be:

~/.themes/Moomex/metacity-1/metacity-theme-1.xml

You don't need to logoff just to restart the theme, let alone restart your computer.

Here's a bash script to help replace the window manager and restart the theme. Extract the file, open a terminal on that directory and run:

sh met_rep.sh

EDIT: here's the file...:

met_rep.sh.zip

Link to comment
Share on other sites

Wow, I feel like an idiot,

I was editing the /usr/share/themes/Moomex/metacity-1/ file. Didn't even think to look in my user folder. Editing that file fixed it and now its perfect.

Thanks again for the help, slowly learning this stuff. Really appreciated! (Y)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.