compton
compton copied to clipboard
Exclude opacity for specific programs
There are multiple options to exclude specific behaviors (shadows, fade effects, etc) but there's nothing for the opacity. How can I disable opacity (setting it to 1.00) for specific programs?
There already is option called opacity-rule with which you can set opacity for certain program for example opacity-rule = [ "80:class_g = 'URxvt'" ];
would set windows with class URxvt to 80% opacity just replace it with any value you need and it should work
My bad! I guess it didn't work at first because I didn't enter a XX: value before the class.. How is that there are empty rules ( ex: fade-exclude = [ ]; ) for whatever-rule but not for opacity?
I'm sorry but it looks like 1) I can't have a 100% opacity and B) I have fullscreen videos still transparent..
The first part i'm not sure why 100 doesn't work maybe 99 might be enough but for the second part depending on browser i remember that at least firefox creates window with different classname for fullscreen i think it was either "plugin-container" or "Navigator" as classname but not sure right now(you can check that yourself with xprop
) so you could set that to always be focused or the opacity rule should work
I can't seem to get opacity-rule to work. I take it that it goes in ~/.config/compton.conf? This is what I used:
opacity-rule = [ "100:class_g = 'Smplayer'" ];
This is what xprop outputs:
WM_CLASS(STRING) = "smplayer", "Smplayer"
I've tried both strings, but I can't seem to stop smplayer going slightly transparent. Same for mplayer.
Any ideas?
Ok I found the reason. Compton needed to be started via dbus-launch.
@slackhead can you explain what did you do? 100 opacity isn't working for me
In your WM startup file you must use:
dbus-launch compton (options) &
That works for i3. I haven't tried it in fluxbox yet, but I'm sure that it will. If you use something like XFCE, Gnome or KDE you'll have to find a way to launch it like that.
I hope that helps.
I used exec_always dbus-launch compton -CG --config ~/.config/compton.conf &
in my i3 config file and it launches compton but it ignores somehow the 100 value. it works only until 99, if there's 100 it simply ignores the line.. Can't tell why it behaves like this (I'm using arch and i3wm btw)
Yeah, you're right. I checked again and it does ignore 100%. 99% seems to = 100 opacity, or as near as I can tell.
I used compton-conf to set everything to 1.0 by default, which does work. My remark about using dbus-launch was more to do with making windows fully opaque, because some were semi-transparent without dbus.
I compromised making every window fully opaque by default and setting custom opacity via opacity-rule for all the programs I want to be transparent. The only problem I have here is that compton makes lemonbar fully transparent somehow but nobody answered my issue about that for a month. Maybe one day.. Thanks anyway you made me rethink how I was setting compton and now I almost have the configuration I wanted!
If you can find the window class for lemonbar you might be able to fix it.
it looks like it ignores it. the class is Bar
but no matter what I enter it doesn't affect it anyway
I was able to achieve 100% opacity for Firefox by setting active-opacity = 1;
(I don't want transparency by default) and not including Firefox on opacity-rule
. Then restarted both compton and i3 for the change to be applied.
Restarting compton alone didn't reset the opacity for the running instance of Firefox.
Hello, I had an attempt at fixing this problem, by allowing setting opacity to 100 with rules. If you could give yshui/compton@30c14c06d2eef008a7eeb3c0e23d8a08c8ba37e1 (i.e. the opacity branch) a try, and report back, that will be much appreciated.
Hello, I had an attempt at fixing this problem, by allowing setting opacity to 100 with rules. If you could give yshui/compton@30c14c0 (i.e. the opacity branch) a try, and report back, that will be much appreciated.
Can confirm, the fix is working for me :)