'picom transparency doesn't apply to alacritty (bspwm)

I have a fresh install of arch linux and am currently trying to theme the terminal (alacritty) and the transparency when I set it in ~/.config/picom/picom.conf never applies when I sudo pkill picom then sudo picom --experimental-backends -b any help in the right direction would be greatly appreciated.



Solution 1:[1]

Method 1:

In your picom config file (by default ~/.config/picom/picom.conf) there should a list at the end of Trasparency/Opacity section. There should be some examples on how to set opacity effects. But nevertheless here is the syntax:

opacity-rule = [
"OPACITY_VALUE:class_g    ='CLASS_NAME'"
]

OPACITY_VALUE is a number from 1-100 where 0 is fully invisible and 100 is fully opaque. And you can get the CLASS_NAME of any window by executing the following command and clicking on a window.

xprop | grep "CLASS"

Note: The CLASS_NAME value is actually the second one.

So if you want to have the alacritty window transparent, paste the following snippet right in the middle of the opacity-rule list.

"85:class_g    ='Alacritty'",

Method 2:

Me personally, I don't use the first method. Because it causes the text to be transparent as well. So if you only want to make your background transparent, go to your alacritty config file (By default, it should be on ~/.config/alacritty/alacritty.yml.

If it is not there, copy everything from the example config located in /usr/share/doc/alacritty/example/alacritty.yml and paste to ~/.config/alacritty/alacritty.yml

There, find the window: section. Under that, paste the line as shown below. The code should look somewhat similar.

window:
    opacity: 0.80 #From 0.00 to 1.00

Hope this helps.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1