Debian 上 Compton 的自定义指南
可行性与配置文件位置
快速上手步骤
sudo apt update && sudo apt install compton。mkdir -p ~/.config && nano ~/.config/compton.conf。killall compton && compton --config ~/.config/compton.conf &sudo systemctl restart comptoncompton --config ~/.config/compton.conf &。常用配置项与示例
backend:渲染后端,常用 “glx” 或 “xrender”(性能与兼容性取舍)。vsync:垂直同步,设为 true/false 以适配撕裂与性能。shadow:窗口阴影,设为 true/false。opacity / alpha:整体透明度(0.0–1.0)。ignore_root:忽略根窗口透明度,部分桌面环境建议设为 true。[blur]
method = gaussian
size = 10
deviation = 5.0
[opacity-rule]
90:class_g 'Firefox'
95:name 'Terminal'
100:class_g 'Xephyr'
shadow-exclude = [
".*",
".*\\..*",
".*\\..*\\..*"
];
常见问题与排错
sudo systemctl restart compton。必要时在会话启动脚本中显式指定配置启动。