compton disable transparency for full screen windows

Created on 29 Dec 2016  路  10Comments  路  Source: chjj/compton

# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true; # zero the part of the shadow's mask behind the window
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.7;
shadow-exclude = [ "name = 'Notification'", "name *= 'VLC'", "name *= 'compton'", "name *= 'Firefox'", "class_g ?= 'Cairo-dock'", "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'" ];
shadow-ignore-shaped = false;

# Opacity
menu-opacity = 0.9;
inactive-opacity = 0.80;
active-opacity = 0.92;
frame-opacity = 0.7;
inactive-opacity-override = false;
alpha-step = 0.06;
blur-kern = "3x3box"
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
# opacity-rule = [ 'class_g = "Firefox":1.00' ]
# opacity-rule = [ "100:name *= 'Firefox'" ]

# Fading
fading = false;

# Other
backend = "glx"
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = false;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
paint-on-overlay = true;
unredir-if-possible = true;
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];

# GLX backend
glx-no-stencil = true;
glx-copy-from-front = false;
glx-swap-method = "undefined";

# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
};

You can see my compton config file above but I am having issues, when using certain programs firefox or even using a regular application in full screen mode, can I disable the transparencies?

Most helpful comment

@agauniyal Due to #408 it's a bit tricky. To be safe, it should look something like this:

opacity-rule = [
  "99:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'",
];

How many duplicates you use depends a little on how much your window manager supports. I'd say 5 should be plenty, though.

All 10 comments

I would love to see functionality to modify opacity if the window is fullscreen or not. +1

If this currently already exists, I'd love an example config :)

You can use an opacity rule matching _NET_WM_STATE_FULLSCREEN on _NET_WM_STATE@:32a for this.

No proper compton option yet?

Compton isn't really being developed anymore. But this is already possible, see my answer above.

@Airblader thank you, I wasn't aware of its development status. Still it fulfills all my need so I'm going to continue it's use :)

You can use an opacity rule matching _NET_WM_STATE_FULLSCREEN on _NET_WM_STATE@:32a for this.

How would this look inside the Compton config? I'm not so familiar with Compton rules, would placing them like opacity-rule = ["99:_NET_WM_STATE_FULLSCREEN: '_NET_WM_STATE@:32a'"]; work?

@agauniyal Due to #408 it's a bit tricky. To be safe, it should look something like this:

opacity-rule = [
  "99:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'",
  "99:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'",
];

How many duplicates you use depends a little on how much your window manager supports. I'd say 5 should be plenty, though.

Compton isn't really being developed anymore.

@Airblader @agauniyal it is developed, it's just going here.

Yes, I'm aware now. I don't think it used to be like that when I wrote that comment, at least to my knowledge. Glad people are continuing to work on it!

You can use an opacity rule matching _NET_WM_STATE_FULLSCREEN on _NET_WM_STATE@:32a for this.

I wonder btw if a better way that would suit 95% of users is to just disable transparency for focused windows with this config line:

opacity-rule = [ "100:focused" ];

Would be cool if we could specify a window for 100% opacity but still keep other windows transparent.
I want to keep every window but Firefox transparent.
If there is a way please let me know.
:)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sainathadapa picture sainathadapa  路  3Comments

ghost picture ghost  路  16Comments

ghost picture ghost  路  10Comments

Spheerys picture Spheerys  路  9Comments

tsmithe picture tsmithe  路  13Comments