Linux下 Compton 配置最佳实践
一 基础配置与安装
[Unit]
Description=Compton Window Composer
After=xorg.service
[Service]
ExecStart=/usr/bin/compton --config /etc/compton.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
启用命令:sudo systemctl daemon-reload && sudo systemctl enable --now compton。修改配置后可用 systemctl restart compton 生效。二 性能优先的关键选项
三 视觉质量与排除规则
四 稳定性与调试
五 示例配置与适用场景
backend = "glx"
vsync = "passive"
shadow = false
bg-blur = false
opacity = false
fade = false
unredirect = true
glx-no-stencil = true
glx-use-glxteximage2d = false
backend = "glx"
vsync = "true"
shadow = true
shadow-exclude = [ "name = 'Conky'", "class_g = 'Polybar'" ]
shadow-dim = 0.4
bg-blur = true
screen-edge-blur = true
opacity-rule = [ "90:class_g = 'Firefox'", "0.95:class_g = 'Alacritty'" ]
fade = true