Compton: Is There A Way To Completely Exclude Applications?

Created on 23 Mar 2014  路  14Comments  路  Source: chjj/compton

Hi,

Is there a way to exclude applications with compton? I really don't want Firerfox to have any effects going on with compton, you name it, opacity, shadows, fade, etc., I'd like to be able to have Firefox run without any compton effects if possible?

Thanks...

Most helpful comment

Hi richardgv,

Ok this is what I have for now that I understand and it seems to be woking. Does this look ok?

shadow-exclude = [
"name = 'Notification'",
"name *= 'compton'",
"class_g = 'Firefox'",
"class_g = 'Conky'",
"class_g = 'Vlc'"
];

fade-exclude = [
"class_g = 'Firefox'"
];

focus-exclude = [
"class_g = 'Firefox'"
];

By the way I wanted to add in xterm and I did it like this but it still fades but Firefox doesn't, why is that and how do I stop fade for xterm?

fade-exclude = [
"class_g = 'Firefox'",
"class_g = 'xterm'"
];

I also added xterm like this too;

focus-exclude = [
"class_g = 'Firefox'",
"class_g = 'xterm'"
];

Speaking of opacity can you simply make for compton an opacity exclude rule like the others like this?

opacity-exclude = [
"class_g = 'Firefox'",
];

Because I just noticed for the bookmarks in Firefox, if you put your mouse on a bookmark, you'll get a small popup window that shows the name and url, but this popup is slightly translucent with compton running, that's why I was hoping you could make an opacity-exclude = [ rule to stop this?

thanks

All 14 comments

The closest I could see is --shadow-exclude 'class_g = "Firefox"' --focus-exclude 'class_g = "Firefox"' --fade-exclude 'class_g = "Firefox"'. --frame-opacity couldn't be excluded, but _NET_FRAME_EXTENTS on the client window may be modified to remove the effect. There's no way to turn --blur-background off on a per-window basis. If you have --active-opacity enabled, or the window has _NET_WM_WINDOW_OPACITY, their effects could be disabled on a window with --opacity-rule (if your WM doesn't reset it automatically).

Hi richardgv,

Ok this is what I have for now that I understand and it seems to be woking. Does this look ok?

shadow-exclude = [
"name = 'Notification'",
"name *= 'compton'",
"class_g = 'Firefox'",
"class_g = 'Conky'",
"class_g = 'Vlc'"
];

fade-exclude = [
"class_g = 'Firefox'"
];

focus-exclude = [
"class_g = 'Firefox'"
];

By the way I wanted to add in xterm and I did it like this but it still fades but Firefox doesn't, why is that and how do I stop fade for xterm?

fade-exclude = [
"class_g = 'Firefox'",
"class_g = 'xterm'"
];

I also added xterm like this too;

focus-exclude = [
"class_g = 'Firefox'",
"class_g = 'xterm'"
];

Speaking of opacity can you simply make for compton an opacity exclude rule like the others like this?

opacity-exclude = [
"class_g = 'Firefox'",
];

Because I just noticed for the bookmarks in Firefox, if you put your mouse on a bookmark, you'll get a small popup window that shows the name and url, but this popup is slightly translucent with compton running, that's why I was hoping you could make an opacity-exclude = [ rule to stop this?

thanks

Ok this is what I have for now that I understand and it seems to be woking. Does this look ok?

Yes.

By the way I wanted to add in xterm and I did it like this but it still fades but Firefox doesn't, why is that and how do I stop fade for xterm?

Use --fade-exclude 'class_g = "XTerm"' instead of class_g = "xterm".

Speaking of opacity can you simply make for compton an opacity exclude rule like the others like this?

_NET_WM_WINDOW_OPACITY has the highest priority when determining the opacity of a window, so should you need to ensure a window has a particular opacity, set the property on the window. For example, you could use --opacity-rule '99:class_g = "Firefox" && window_type = "tooltip"'.

By the way, the tooltip window is possibly semi-transparent because wintypes -> tooltip -> opacity in your configuration file, or you didn't enable --mark-ovredir-focused.

HI

Sorry I'm lost here, I do have xterm under fade-exclude, I don't see what's wrong, or what you're trying to point out?

fade-exclude = [
"class_g = 'Firefox'",
"class_g = 'xterm'"
];

Regarding firefox I have this below,

wintypes:
{
tooltip =
{
opacity = 0.75;

and

mark-ovredir-focused = true;

Would I change any of them or just make is all now the,
--opacity-rule '99:class_g = "Firefox" && window_type = "tooltip"' ?

By the way I added in for Firefox like this and it didn't work;

--opacity-rule "99:class_g = 'Firefox' && window_type = 'tooltip'"

then I changed it to this and it still doesn't work;

opacity-rule = [
"99:class_g = 'Firefox'",
"window_type = 'tooltip'"
];

Also I noticed you make your quotes different, but the configuration I found online had them the way I'm showing you and everything in it works like this...

thanks...

Sorry I'm lost here, I do have xterm under fade-exclude, I don't see what's wrong, or what you're trying to point out?

Well, I saw this in your previous reply:

By the way I wanted to add in xterm and I did it like this but it still fades but Firefox doesn't, why is that and how do I stop fade for xterm?

So I suppose you added "class_g = 'xterm'" to fade-exclude and xterm is still fading in/out. I was trying to indicate xterm's general WM_CLASS is XTerm instead of xterm and that's why your line didn't work.

Would I change any of them or just make is all now the,
--opacity-rule '99:class_g = "Firefox" && window_type = "tooltip"' ?

If you wish to let tooltips of other applications remain 75% opaque by default, use the opacity rule, otherwise just change wintypes -> tooltip -> opacity = 0.75; to 1.0.

By the way I added in for Firefox like this and it didn't work;

It does work for me. After applying the rule all tooltip windows of Firefox are turned opaque. Not really sure why it would appear broken for you...

Also I noticed you make your quotes different, but the configuration I found online had them the way I'm showing you and everything in it works like this...

compton uses Python string syntax and single-quote and double quote is equivalent (as far as you don't mix them). I usually use single quotes outside since it's safer in shell. libconfig requires string values be wrapped inside double quotes, though.

Ahhh my bad XTerm... :)

Ok I understand this below now;
winntypes -> tooltip -> opacity = 0.75; to 1.0.

I was talking about the rule for only firefox like below does not work;

opacity-rule = [
"99:class_g = 'Firefox'",
"window_type = 'tooltip'"
];

I was talking about the rule for only firefox like below does not work;

Use opacity-rule = [ "99:class_g = 'Firefox' && window_type = 'tooltip'" ]. It's not okay to break a rule up (unless it's a top-level ||-ed rule), and actually you should would get an warning on stderr if you wrote things like that (parse_rule_opacity(...): No opacity specified?). (It's weird that the "99:class_g = 'Firefox'" isn't causing all your Firefox windows to have 99% opacity, though.)

Not sure what you mean by break a rule up?

So the way I wrote it before like this beliow is correct and it should of worked?

opacity-rule = [
"99:class_g = 'Firefox'",
"window_type = 'tooltip'"
];

@SlackBox:

Well, if my words are really so hard to understand... Is there any issue in my English or something?

DO NOT break "99:class_g = 'Firefox' && window_type = 'tooltip'" up to two rules "99:class_g = 'Firefox'" and "window_type = 'tooltip'", like what you did above (which should still work, yet not very correctly), and please use opacity-rule = [ "99:class_g = 'Firefox' && window_type = 'tooltip'" ], like what I indicated above.

LOL, no your English is fine, sorry for not being clear, I should of said not understanding fully the concept of Compton, still getting used to things, I wasn't sure what this 'rule' exactly was, but now I see what you mean... :)

So now I have it as one rule like this;

opacity-rule = [
"99:class_g = 'Firefox' && window_type = 'tooltip'"
];

Thanks richardgv

Cool. :-)

Sorry for commenting on an old, closed issue.

opacity-rule = [
    "99:class_g = 'Firefox'"
]

Why 99 instead of 100 and why isn't 100 working?

Compton ignores values of 100. Unfortunately, with 99, it's still possible to see a tiny bit of transparency.

Hello again, I face problems with firefox.
Now I have both firefox-developer-edition and firefox-nightly.
Using "class_g='firefox-developer-edtition'" or "class_g='Firefox'" doesn't really work for me.
Also, I can't use "name~='firefox.*'"

I am using compton version 7.4.
Please help.

Edit:
using "name~='Firefox.*'" solved my issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndreasBackx picture AndreasBackx  路  6Comments

ghost picture ghost  路  16Comments

Spheerys picture Spheerys  路  9Comments

Brett99 picture Brett99  路  12Comments

orschiro picture orschiro  路  3Comments