CentOS 上 Compton 的最佳配置实践
一 安装与准备
二 配置文件模板与关键参数
backend = "glx"
vsync = "true" # 有撕裂可改为 false 试验
shadow = false
fading = false
blur = false
opacity-rule = [ "90:class_g='Firefox'", "90:class_g='Chromium'" ]
unredirect = true
glx-no-stencil = true
glx-use-dri3 = true
backend = "glx"
vsync = "true"
shadow = true
shadow-radius = 12
shadow-offset-x = -12
shadow-offset-y = -12
shadow-opacity = 0.45
fading = true
fade-delta = 10
blur-background = true
blur-kern = "7x7box"
blur-radius = 3
opacity-rule = [ "0.92:class_g='Gnome-terminal'", "0.90:class_g='Alacritty'" ]
unredirect = false
glx-no-stencil = false
glx-use-dri3 = true
三 启动与自启动
[Unit]
Description=Compton Window Composer
After=display-manager.service
[Service]
Type=simple
ExecStart=/usr/bin/compton --config /home/你的用户名/.config/compton.conf --log-level 0
Restart=always
Environment=XDG_RUNTIME_DIR=/run/user/%U
[Install]
WantedBy=default.target
四 性能调优与常见问题