温馨提示×

Debian如何自定义Compton配置

小樊
52
2025-08-16 00:10:13
栏目: 智能运维

在Debian中自定义Compton配置,可参考以下方法:

  • 编辑配置文件:Compton默认配置文件通常位于~/.config/compton.conf,若不存在则手动创建。使用文本编辑器(如nano)打开文件,可设置如background-opacity(背景透明度,0.0-1.0之间)、shadow-exclude(阴影排除区域)、blur-radius(模糊半径)等参数。修改后保存文件,通过pkill comptoncompton -c ~/.config/compton.conf &重启Compton使配置生效。
  • 命令行参数设置:可直接在启动Compton时通过命令行参数传递配置,如compton --background "#000000" --shadow-exclude "class_g = 'Firefox'"等。
  • 使用systemd服务:创建/etc/systemd/system/compton.service文件,添加配置内容,如ExecStart=/usr/bin/compton -c /home/your-username/.config/compton.conf,然后执行sudo systemctl daemon-reloadsudo systemctl enable comptonsudo systemctl start compton来设置开机自启并启动服务。

0