在 Linux 中,Compton(现在多被 fork 为 picom)的配置文件位置和方式取决于你使用的发行版和安装方式。下面按常见情况说明:
~/.config/compton.conf
或
~/.compton.conf
如果不存在,可以自己创建:
mkdir -p ~/.config
touch ~/.config/compton.conf
/etc/xdg/compton.conf
或
/usr/share/doc/compton/examples/compton.conf
(有些发行版会提供示例文件)
backend = "glx";
shadow = true;
fade = true;
opacity-rule = [
"90:class_g = 'URxvt'"
];
保存后重启 compton:
killall compton
compton --config ~/.config/compton.conf &
很多新系统已经用 picom 替代 compton:
配置文件位置:
~/.config/picom/picom.conf
启动:
picom --config ~/.config/picom/picom.conf
which compton
which picom
如果你告诉我:
我可以给你完全对应的配置示例。