debian

怎样通过Compton提升Debian的视觉体验

小樊
54
2025-08-28 02:15:32
栏目: 智能运维

  1. 安装Compton
    更新系统后安装:

    sudo apt update && sudo apt install compton
    
  2. 配置视觉效果
    编辑配置文件 ~/.config/compton.conf,常用参数:

    • 阴影shadow = true,调整 shadow-radiusshadow-opacity 等参数。
    • 背景模糊bg_blur = true,设置 blur-kern(如 "3x3box")控制模糊程度。
    • 透明度opacity = 0.8(窗口透明度),inactive-opacity = 0.7(非活动窗口透明度)。
    • 垂直同步vsync = true 减少画面撕裂。
    • 性能优化glx-no-stencil = trueunredir-if-possible = true 提升流畅度。
  3. 启用特效

    • 圆角窗口:添加 corner-radius = 10(需配合 rounded-corners-exclude 排除特定窗口)。
    • 淡入淡出fading = true,调整 fade-deltafade-in-step/fade-out-step 控制速度。
  4. 启动与自动运行
    手动启动:

    compton --config ~/.config/compton.conf
    

    自动启动:创建 systemd 服务文件 /etc/systemd/system/compton.service,内容参考,然后执行:

    sudo systemctl enable compton && sudo systemctl start compton
    
  5. 调试与优化

    • 若遇性能问题,可尝试切换后端:backend = xrender(牺牲特效换性能)。
    • 排除特定应用特效:在 shadow-excludeopacity-exclude 中添加窗口规则(如 "class_g = 'Conky'")。

根据硬件配置调整参数,平衡视觉效果与性能。

0
看了该问题的人还看了