Ubuntu 上 Compton 配置的最佳实践

一 安装与启用
[Unit]Description=Compton Window ComposerAfter=xorg.service[Service]ExecStart=/usr/bin/compton --config /etc/xdg/compton.confRestart=on-failure[Install]WantedBy=multi-user.target启用命令:sudo systemctl daemon-reload && sudo systemctl enable --now compton。若不使用 systemd,可在会话启动脚本(如 i3/config、Openbox autostart)中启动:compton --config ~/.config/compton.conf。二 基础配置模板与关键参数
backend = glxvsync = falseshadow = falsefading = falseblur = falsemark-wmwin-focused = truemark-ovredir-focused = trueuse-damage = truebackend = glxvsync = trueshadow = trueshadow-radius = 12shadow-offset-x = -8shadow-offset-y = -8fading = truefade-delta = 10blur = trueblur-method = gaussianblur-size = 6blur-deviation = 2.0mark-wmwin-focused = truemark-ovredir-focused = trueuse-damage = true[opacity-rule]90:class_g 'Firefox'95:name 'Terminal'三 性能优化要点
四 故障排查与替代方案