Timan Veteran Posted December 8, 2008 Veteran Share Posted December 8, 2008 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. Link to comment Share on other sites More sharing options...
+Frank B. Subscriber² Posted December 8, 2008 Subscriber² Share Posted December 8, 2008 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 More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 Yep, checked there didn't see anything like that. Saw mostly the font size and style, no alignment. Link to comment Share on other sites More sharing options...
robz0rz Posted December 8, 2008 Share Posted December 8, 2008 Please link to a download location for that theme, I'll look through it to see what I can find also :) Link to comment Share on other sites More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 Moomex-Theme 0.7.1 GTK 2.x Theme/Style http://gnome-look.org/content/show.php/Moo...e?content=57063 Link to comment Share on other sites More sharing options...
rson451 Posted December 8, 2008 Share Posted December 8, 2008 (edited) 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 December 8, 2008 by rson451 Link to comment Share on other sites More sharing options...
Lechio Posted December 8, 2008 Share Posted December 8, 2008 There's a good guide on how to make metacity themes here: http://developer.gnome.org/doc/tutorials/m...ity-themes.html It explains the XML metacity file and how to customize it to fit our needs. Link to comment Share on other sites More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 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 More sharing options...
rson451 Posted December 8, 2008 Share Posted December 8, 2008 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 More sharing options...
Lechio Posted December 8, 2008 Share Posted December 8, 2008 http://blogs.gnome.org/metacity/2008/05/31...-window-titles/ On this specific theme start looking on line 59. Link to comment Share on other sites More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 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 More sharing options...
rson451 Posted December 8, 2008 Share Posted December 8, 2008 I'll look at this more when I get home this evening and have a version of gnome/metacity that isn't ancient (VM is CENTOS 4). Link to comment Share on other sites More sharing options...
Lechio Posted December 8, 2008 Share Posted December 8, 2008 (edited) 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): The way metacity theming works is messy, messy... EDIT: and here is the edited file: metacity_theme_1.zip Edited December 8, 2008 by Lechio Link to comment Share on other sites More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 Heh, ubuntu hates me. Replaced the file, ran that command, even restarted... no luck. Link to comment Share on other sites More sharing options...
Lechio Posted December 8, 2008 Share Posted December 8, 2008 :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 More sharing options...
Timan Veteran Posted December 8, 2008 Author Veteran Share Posted December 8, 2008 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 More sharing options...
Lechio Posted December 8, 2008 Share Posted December 8, 2008 Glad to help. Slow but steady gets us there :) Link to comment Share on other sites More sharing options...
Recommended Posts