picom透明度不适用于Alacritty(BSPWM)

发布于 2025-01-25 06:18:53 字数 183 浏览 2 评论 0 原文

我有一个新的Arch Linux安装,目前正在尝试主题终端(AlAcritty)和透明度,当我在〜/.config/picom/picom.conf中设置它时,当i sudo pkill picom 然后 sudo picom-授予 - backends -b 在正确方向上的任何帮助将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵强ㄟ 2025-02-01 06:18:53

方法1:

在您的PICOM配置文件(默认情况下〜/.config/picom/picom.conf)中,应在部分的末尾列表。应该有一些有关如何设置不透明度效应的示例。但是,这里的语法是:

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

opacity_value是1-100的数字,其中0是完全不可见的,100完全不透明。您可以通过执行以下命令并单击窗口来获取任何窗口的class_name。

xprop | grep "CLASS"

注意:class_name值实际上是第二个。

因此,如果您想具有Alacritty窗口透明,请将以下片段粘贴在 opacity-rule 列表的中间。

"85:class_g    ='Alacritty'",

方法2:

我个人,我不使用第一个方法。因为它也使文本也是透明的。因此,如果您只想使背景透明,请转到您的alacritty config file(默认情况下,它应该在〜/.config/alacritty/alacritty.yml

。 /USR/share/doc/alacritty/example/alacritty.yml并粘贴到〜/.config/alacritty/alacritty.yml

,在此找到窗口: section。下面的代码应该有些相似

window:
    opacity: 0.80 #From 0.00 to 1.00

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文