安装Compton
根据发行版选择命令:
sudo apt-get install comptonsudo dnf install comptonsudo pacman -S compton配置特效
编辑配置文件 ~/.config/compton.conf(不存在则创建),添加以下选项:
bg_blur trueshadow truescreen_edge_blur trueopacity falsevsync truebackend glx(需显卡支持)高级定制
shadow-exclude: [{"x":0,"y":0,"width":100,"height":100}]blur-radius 5(数值越大越模糊)opacity-rule ["CLASS_G='Firefox' FLOAT 0.8"]重启生效
killall compton && compton &sudo systemctl restart compton性能优化
cpulimit 限制CPU占用:cpulimit -l 50 -p $(pgrep compton)注意:Compton可能与GNOME/KDE等桌面环境冲突,若出现兼容性问题可尝试禁用或卸载 。
参考来源: