Compton 是一个用于在 Linux 上实现 Compositor 的程序,它可以提高桌面环境的视觉效果。要调整 CentOS 中的 Compton 配置,请按照以下步骤操作:
sudo yum install compton
mkdir -p ~/.config/compton
touch ~/.config/compton/config.conf
这将在 ~/.config/compton 目录下创建一个名为 config.conf 的配置文件。
config.conf 文件。例如,使用 nano 编辑器:nano ~/.config/compton/config.conf
config.conf 文件中,您可以设置各种选项以调整 Compton 的行为。以下是一些常用选项:backend: 设置 Compton 使用的后端。可选值有 glx, egl, x11。例如:backend = "glx";
shadow-exclude: 设置一个逗号分隔的窗口类列表,这些窗口将不会显示阴影。例如:shadow-exclude = ["带领", "Dock"];
fade: 启用或禁用淡入淡出效果。可选值有 true 或 false。例如:fade = true;
unredir-if-transparent: 启用或禁用透明窗口的重定向。可选值有 true 或 false。例如:unredir-if-transparent = true;
glx-no-stencil: 启用或禁用 GLX 无模板缓冲区。可选值有 true 或 false。例如:glx-no-stencil = false;
根据您的需求修改配置文件中的选项。完成后,保存并关闭文件。
重新启动 Compton 以应用更改。您可以通过以下命令重启 Compton:
compton -c ~/.config/compton/config.conf &
现在,Compton 应该会根据您在 config.conf 文件中所做的更改进行调整。如果需要进一步调整设置,只需编辑配置文件并重新启动 Compton 即可。