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

compton disable transparency for full screen windows #403

Open
teamblubee opened this issue Dec 29, 2016 · 11 comments
Open

compton disable transparency for full screen windows #403

teamblubee opened this issue Dec 29, 2016 · 11 comments

Comments

@teamblubee
Copy link

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

@innateessence
Copy link

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

@Airblader
Copy link

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

@agauniyal
Copy link

agauniyal commented Sep 3, 2017

No proper compton option yet?

@Airblader
Copy link

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

@agauniyal
Copy link

agauniyal commented Sep 3, 2017

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

@Airblader
Copy link

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

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
@Hi-Angel
Copy link

Compton isn't really being developed anymore.

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

@Airblader
Copy link

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!

@Hi-Angel
Copy link

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

@highonskooma
Copy link

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

@sebasijan
Copy link

@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

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

7 participants