Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is There A Way To Completely Exclude Applications? #182

Closed
ghost opened this issue Mar 23, 2014 · 15 comments
Closed

Is There A Way To Completely Exclude Applications? #182

ghost opened this issue Mar 23, 2014 · 15 comments

Comments

@ghost
Copy link

ghost commented Mar 23, 2014

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...

@richardgv
Copy link
Collaborator

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).

@ghost
Copy link
Author

ghost commented Mar 24, 2014

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

@richardgv
Copy link
Collaborator

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.

@ghost
Copy link
Author

ghost commented Mar 25, 2014

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...

@richardgv
Copy link
Collaborator

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.

@ghost
Copy link
Author

ghost commented Mar 26, 2014

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'"
];

@richardgv
Copy link
Collaborator

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.)

@ghost
Copy link
Author

ghost commented Mar 26, 2014

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'"
];

@richardgv
Copy link
Collaborator

@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.

@ghost
Copy link
Author

ghost commented Apr 4, 2014

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

@richardgv
Copy link
Collaborator

Cool. :-)

@daGrevis
Copy link

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?

@djsavvy
Copy link

djsavvy commented Jun 14, 2017

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

llitz added a commit to llitz/compton that referenced this issue Aug 10, 2018
When inactive-opacity is enabled, you can override the opacity by using opacity-rule.

By default, all windows have 100 opacity and, if it is still at 100,
inactive-opacity will be applied when the window loses focus. This
patch adds a new bool opacity_disabled to win struct and verify this
variable before deciding if it should be excluded from inactive-opacity

Fix 99% transparency problems on chjj/compton#450 chjj/compton#433
chjj/compton#403 chjj/compton#367 chjj/compton#260 chjj/compton#182
chjj/compton#158
llitz added a commit to llitz/compton that referenced this issue Aug 10, 2018
When inactive-opacity is enabled, you can override the opacity by using opacity-rule.

By default, all windows have 100 opacity and, if it is still at 100,
inactive-opacity will be applied when the window loses focus. This
patch adds a new bool opacity_disabled to win struct and verify this
variable before deciding if it should be excluded from inactive-opacity

Fix 99% transparency problems on chjj/compton#450 chjj/compton#433
chjj/compton#403 chjj/compton#367 chjj/compton#260 chjj/compton#182
chjj/compton#158
@Souravgoswami
Copy link

Souravgoswami commented Sep 29, 2019

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.

@PaulPintang
Copy link

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.

not working, any new solution to fix this problem.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants