在 Linux 中,Compton(现在更多被维护为 picom)的配置文件位置和修改方式如下:
~/.config/compton.conf
或(picom 常见):
~/.config/picom.conf
如果没有,可以手动创建:
mkdir -p ~/.config
touch ~/.config/compton.conf
/etc/compton.conf
/etc/xdg/compton.conf
或
/etc/picom.conf
用任意文本编辑器打开,例如:
nano ~/.config/compton.conf
常见配置示例:
backend = "glx";
shadow = true;
opacity-rule = [
"90:class_g = 'Alacritty'"
];
修改后重启 compton / picom:
killall compton
compton &
或(picom):
killall picom
picom &
如果用了窗口管理器(i3 / bspwm / openbox),也可以在配置里加:
exec --no-startup-id compton
which compton
which picom
现代发行版(Arch / Ubuntu 22+)基本都用 picom。
如果你告诉我:
我可以直接给你一份可用的配置。