compton icon indicating copy to clipboard operation
compton copied to clipboard

compton disable transparency for full screen windows

Open teamblubee opened this issue 7 years ago • 11 comments

# 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?

teamblubee avatar Dec 29 '16 14:12 teamblubee

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

innateessence avatar Jan 03 '17 21:01 innateessence

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

Airblader avatar Jan 20 '17 22:01 Airblader

No proper compton option yet?

agauniyal avatar Sep 03 '17 00:09 agauniyal

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

Airblader avatar Sep 03 '17 07:09 Airblader

@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 avatar Sep 03 '17 10:09 agauniyal

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

Airblader avatar Sep 03 '17 11:09 Airblader

Compton isn't really being developed anymore.

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

Hi-Angel avatar Jan 15 '19 06:01 Hi-Angel

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!

Airblader avatar Jan 15 '19 06:01 Airblader

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

Hi-Angel avatar Jan 15 '19 07:01 Hi-Angel

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

highonskooma avatar Nov 13 '20 11:11 highonskooma

@highonskooma

I got it working like this:

opacity-rule = [
 	"99:class_g = 'Firefox'",
 	"99:name *= 'VLC'"
];

Unfortunately the solution for fullscreen given above does not work on xmonad

sebasijan avatar Dec 31 '21 23:12 sebasijan