Ubuntu下Compton与Gnome Shell集成步骤如下:
安装Compton:
sudo apt update && sudo apt install compton
配置Gnome Shell:
sudo apt install gnome-tweaks gnome-shell-extensions
创建Compton配置文件:
在~/.config/下创建compton.conf,添加自定义配置(如阴影、透明度等)。
示例配置:
backend = "glx";
shadow-exclude = ["class_g = 'Gnome-shell'"]; # 避免与GNOME Shell冲突
fade = true;
设置开机自启:
gnome-session-properties添加启动项(命令:compton)。~/.compton.desktop文件(内容参考),并放入~/.config/autostart/。重启Gnome Shell:
按Alt + F2,输入r回车生效。
注意事项:
shadow-exclude排除GNOME Shell窗口,或调整backend为xrender。