安装Compton
根据发行版选择命令:
sudo apt-get install comptonsudo pacman -S comptonsudo dnf install compton编辑配置文件
~/.config/compton.conf(若不存在则创建)。backend:设置后端(xrender/glx,glx性能更佳)。shadow:启用/禁用阴影(true/false)。opacity:设置窗口透明度(0.0-1.0)。vsync:启用/禁用垂直同步(true/false)。shadow-radius:调整阴影模糊半径。backend = "glx";
shadow = true;
opacity = 0.8;
vsync = true;
shadow-radius = 5.0;
重启Compton生效
sudo systemctl restart compton。compton --config ~/.config/compton.conf &。可选:图形化工具
Debian/Ubuntu可安装compton-config工具,通过界面编辑配置。
注意:修改配置前建议备份原文件,部分参数(如backend)需根据显卡兼容性调整。