I decided to have a look into implementing this as a little project to learn my way around gnome programming. Its a little rough around the edges, and I've temporarily broken RTL languages swapping the button layouts, as it pulled in a lot of dependencies into libmetacity-private.
If something like this would be a reasonable solution, I'm happy to put more work into cleaning it up and integrating as a patch to the metacity package, as well as implementing it in compiz.
Another issue is whether to add it as a spec in a new version of metacity theme (version 3), or just an extra piece in a version 1 theme, as it doesn't seem to break anything...
So, the implementation right now is to have an element in the theme file like this:
If the theme does not have that element, it defaults back to the string located in gconf (/apps/metacity/general/button_layout). There is also a new key in gconf called force_button_layout, which if true, forces metacity to ignore all themes' button layouts.
So attached is this rough patch to the git version of metacity, and it currently works on my machine!
I decided to have a look into implementing this as a little project to learn my way around gnome programming. Its a little rough around the edges, and I've temporarily broken RTL languages swapping the button layouts, as it pulled in a lot of dependencies into libmetacity- private.
If something like this would be a reasonable solution, I'm happy to put more work into cleaning it up and integrating as a patch to the metacity package, as well as implementing it in compiz.
Another issue is whether to add it as a spec in a new version of metacity theme (version 3), or just an extra piece in a version 1 theme, as it doesn't seem to break anything...
So, the implementation right now is to have an element in the theme file like this:
<button_layout value=" menu:minimize, maximize, close"/ >
If the theme does not have that element, it defaults back to the string located in gconf (/apps/ metacity/ general/ button_ layout) . There is also a new key in gconf called force_button_ layout, which if true, forces metacity to ignore all themes' button layouts.
So attached is this rough patch to the git version of metacity, and it currently works on my machine!