Picom Transparency Disable on Specific Windows (websites)

8,286

Yes, the manual page for picom explains how to set opacity rules for specific windows based on their name or class.

--opacity-rule OPACITY:'CONDITION'
   Specify a list of opacity rules, in the format PERCENT:PATTERN,
   like 50:name *= "Firefox". picom-trans is recommended over this.
   Note we don’t make any guarantee about possible conflicts with
   other programs that set _NET_WM_WINDOW_OPACITY on frame or client
   windows.

For example, if you want any window that has Netflix in its name to always be of 100% opacity, you would put this in ~/.config/picom/picom.conf:

opacity-rule = [
  "100:name *= 'Netflix'"
];

If you have something like inactive-opacity = 0.90; that makes inactive windows semi-transparent, you can also add inactive-opacity-override = false; to make sure it doesn't conflict with the rules.

Share:
8,286
ScottishTapWater
Author by

ScottishTapWater

Updated on September 18, 2022

Comments

  • ScottishTapWater
    ScottishTapWater almost 2 years

    I have Picom (Compton) set up so that non-focussed windows are semi-transparent. I like the look and it works for me.

    However, if I have something like youtube playing in a non-active window, I don't want the transparency to kick in.

    Is there any way to get picom to look at the window title and disable transparency if it detects certain keywords (youtube, netflix, jellyfin etc.)?


    System Info:

    Kernel: 5.8.9-arch2-1
    Display Server: xorg
    Window Manager: i3-gaps (4.16.1-186-gf3fffbae)
    Compositor: picom (vgit-699ff)

    • ctrl-alt-delor
      ctrl-alt-delor almost 4 years
      It is possible with kde-plasma. I don't know about other window-managers.