温馨提示×

在Compton中如何配置窗口动画效果

小樊
46
2025-08-29 08:29:12
栏目: 编程语言

  1. 安装Compton

    • Debian/Ubuntu:sudo apt-get install compton
    • Arch:sudo pacman -S compton
  2. 创建/编辑配置文件
    配置文件路径为~/.config/compton.conf,若不存在则新建,用文本编辑器(如nano)打开:

    nano ~/.config/compton.conf
    
  3. 启用动画效果
    在配置文件中添加或修改以下选项:

    • 启用淡入淡出fade = true
    • 设置动画持续时间duration = 300(单位:毫秒,默认值可调整)
    • 启用特定动画效果:如effect = fade(淡入淡出)、effect = push(推挤效果)
    • 优化性能:可添加glx-no-stencil = trueignore-glx-glitz = true
  4. 重启Compton
    保存配置后,重启Compton以应用更改:

    compton -c ~/.config/compton.conf &
    

    (部分系统需通过systemctl restart compton重启服务)

说明

0