You are not logged in.
I'd like to make some scripts to synchronize settings, where possible, between Pantheon 3D and Pantheon Lite
This thread is for seeking advice as much as thinking out loud for how to get this done.
Openbox uses an xml file and Compton uses a json text configuration file.
Compiz can use a flat configuration file or gsettings, and I prefer gsettings.
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline
First, as more applications start using gnome's client side decorations, compiz and openbox have to be told to stop decorating them. CSD windows apparently do not come with any nifty xorg tricks to filter them en masse. I've been doing this by hand, per application thus far, and this is what those configurations look like at the moment:
org.compiz.profiles.Default.plugins.decoration-match
'(any) & !(class=Gnome-control-center) & !(class=Pantheon-*) & !(class=Audience) & !(class=Gedit) & !(class=Noise) & !(class=File-roller) & !(class=Gnome-tweak-tool) & !(class=Popcorn-Time) & !(class=PCSXR) & !(class=Shotwell) & !(class=Files)'~.config/openbox/rc.xml (excerpt)
<application class="Gnome-control-center">
<decor>no</decor>
</application>
<application class="Pantheon-*">
<decor>no</decor>
</application>
<application class="Audience">
<decor>no</decor>
</application>
<application class="Gedit">
<decor>no</decor>
</application>
<application class="Noise">
<decor>no</decor>
</application>
<application class="File-roller">
<decor>no</decor>
</application>
<application class="Gnome-tweak-tool">
<decor>no</decor>
</application>
<application class="Popcorn-Time">
<decor>no</decor>
</application>
<application class="PCSXR">
<decor>no</decor>
</application>
<application class="Shotwell">
<decor>no</decor>
</application>
<application class="Files">
<decor>no</decor>
</application>I need a utility to add new windows to both at the same time. I think this is scriptable, but I'm not fluent in things like sed, regex, or escape characters.
Sketch for a utility that appends new windows to the list:
get the window class to match (needs real sed incantation)
XWINCLASS=$(sed magic(input $(xprop), find WM_CLASS, find the last '"' on that line, output the string between that and the preceding '"'))generate the compiz setting (needs escapes?):
NEW_UNDECOR_COMPIZ=" & !(class=$XWINCLASS)"generate the openbox setting (needs escapes? proper newlines?):
NEW_UNDECOR_OB=" <application class="$XWINCLASS">\n <decor>no</decor>\n </application>\n"Set the compiz setting (needs proper syntax? needs real sed incantation):
dconf write /org/compiz/profiles/Default/plugins/decor/decoration-match $(sed magic(input $(dconf read /org/compiz/profiles/Default/plugins/decor/decoration-match), find the last "'", insert $NEW_UNDECOR_COMPIZ one character before that, output))Set the openbox setting (needs real sed incantation):
sed magic(input ~.config/openbox/rc.xml, find the first "<decor>no</decor>" from the end of the file, find the following "</application>", insert $NEW_UNDECOR_OB on the next line, output) > ~.config/openbox/rc.xmlSketch for a utility that synchronizes the two (if they were not edited by the same utility):
Get the list of applications from compiz's dconf (needs real sed incantation)
XWINCLASSES_COMPIZ=$(sed magic(input $(dconf read /org/compiz/profiles/Default/plugins/decor/decoration-match), find "& !(class=", output the string between that and the following ")" + \n, repeat to end of input))Get the list of applications from ~.config/openbox/rc.xml (needs real sed incantation; which is going to be a nightmare)
XWINCLASSES_OB$(sed magic(input ~.config/openbox/rc.xml, find "<decor>no</decor>", find the preceding " <application ", find the following "class=" or continue to the next "<decor>no</decor>" after the following, repeat until finding "class=", output the string between that and the following '"' + \n, repeat until the end of input))Sort aphabetically both lists, diff, add new entries to the least recently changed, remove new deletions from the least recently changed.
no idea how to do that yetSide note: any thoughts on a sed front-end called sedmagic that takes natural language input?
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline
Last time I checked, openbox handled client side decorated windows just fine without any extra tweaks.
Offline
With openbox-git 3.5.2.12.geffa866-1
Special bonus: the gap between openbox's decoration and the CSD window isn't only transparent, it's click-through, just like the openbox decoration as if they weren't even there.
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline
well.. I didn't have that issue with any gnome applications, like nautilus etc. on openbox when the csd feature was first introduced.
I assume those are all elementary applications on the screenshot, and I haven't tried those with openbox, but I don't remember seeing that same issue with any applications back then.
Offline
The "Settings" app there is gnome-control-center. All CSD windows are getting decorated by openbox, plus one more I just figured out: even with the "<application>" propety "<decor>no</decor>" they still have a 1px frame floating around them, which is caused by the "<theme>" property "<keepBorder>yes</keepBorder>"; have to set that to "no" if there are any CSD window-ed applications; apparently it only removes the border from undecorated windows.
I should try this again without compton running; it's possible that the compositor somehow tells openbox to decorate them even if they shouldn't be, but I'm not sure how openbox would know the difference between an ordinary window or a CSD window as they have no special x11 properties.
Last edited by quequotion (2014-08-14 14:44:15)
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline
Hotkeys are another problem. I use gnome-session to cover most of them, but some things are bound to each window manager/compositor, like Alt+Mousewheel Up/Down for window transparency, and have to be handled by their respective settings.
makepkg-optimize · indicator-powersave · pantheon-{3d,lite} · {pantheon,higan}-qq
Offline