在 Linux 上“测试 Compton 配置”通常包含三步:确认 Compton 能启动、验证配置是否生效、观察视觉效果和性能。下面按实用流程说明(以常见发行版为例)。
which compton
# 或
compton --version
如果没有:
# Debian/Ubuntu
sudo apt install compton
# Arch
sudo pacman -S compton
注:很多发行版已改用 picom(compton 分支),命令可能是
picom。
compton --config ~/.config/compton.conf -d
或
compton -c -r 10 -o 0.5
-d:调试模式(输出日志)常见问题:
打开一个终端:
transset 0.5
点击窗口,看是否变透明。
在配置中:
shadow = true
shadow-radius = 20
打开窗口,看是否有阴影。
compton --benchmark
或配合:
glxinfo | grep "direct rendering"
~/.config/compton.conf
backend = "glx";
shadow = true;
shadow-radius = 15;
shadow-opacity = 0.5;
fade = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
opacity-rule = [
"90:class_g = 'URxvt'",
"80:class_g = 'Firefox'"
];
测试:
compton --config ~/.config/compton.conf
在配置中加入:
exec --no-startup-id compton
ps aux | grep compton
pkill compton
compton &
compton --log-level trace
Compton 不支持 Wayland,请改用:
kwin(KDE)mutter(GNOME)hyprland / sway 自带合成器如果你愿意,可以:
我可以帮你逐条检查配置。