Linux Compton配置方法如下:
安装Compton
sudo apt install comptonsudo dnf install comptonsudo pacman -S compton创建/编辑配置文件
~/.config/compton.conf(若不存在则手动创建)。backend "glx":选择GPU加速后端(需显卡支持)。shadow true/false:启用/禁用窗口阴影。opacity 0.8:设置窗口透明度(0.0-1.0)。vsync true/false:启用/禁用垂直同步。shadow-exclude ["class_g='Firefox'"]:排除特定窗口的阴影。重启Compton生效
killall compton && compton &。sudo systemctl restart compton。高级优化(可选)
cpulimit -l 50 -p $(pgrep compton)。compton -c ~/.config/compton.conf -v。注意:部分桌面环境(如GNOME)可能自带合成器,需先禁用以避免冲突。详细配置可参考官方文档。[1,2,3,4,5,6,7,8,9,10]