安装Compton
在Ubuntu中通过终端安装:
sudo apt update && sudo apt install compton (若需最新特性,可尝试安装picom,它是Compton的活跃分支)
启用基础视觉效果
编辑配置文件~/.config/compton.conf,添加以下参数:
backend = "glx"; # 使用GPU加速的后端,提升性能 shadow = true; # 启用窗口阴影,增强立体感 opacity = 0.9; # 设置窗口透明度(0.0-1.0) bg_blur = true; # 启用背景模糊,营造朦胧感 screen_edge_blur = true; # 模糊屏幕边缘,聚焦工作区 vsync = true; # 开启垂直同步,减少画面撕裂 优化性能
bg_blur = false; shadow = false; cpulimit -l 50 -p $(pgrep compton) # 限制Compton占用50% CPU 自动启动Compton
将以下命令添加到桌面环境的“启动应用程序”中,或通过systemd配置开机自启:
compton --config ~/.config/compton.conf -b 调试与调整
backend = "xrender"; ignore-glx-glitz = true; compton --config ~/.config/compton.conf --log-level INFO 通过以上配置,可显著提升Ubuntu的窗口动画、透明度和整体视觉流畅度,同时保持系统性能平衡。