Compton 是一个基于 X11 的 compositor,它提供了阴影、淡入淡出和透明度等功能,可以显著提升 Debian 用户的视觉体验。以下是如何在 Debian 系统中安装和配置 Compton 的步骤:
sudo apt update
sudo apt install compton
安装完成后,你可以通过创建或编辑配置文件来调整 Compton 的行为。配置文件通常位于 ~/.config/compton.conf
。以下是一个基本的配置示例:
# compton.conf 示例配置 # 启用阴影 shadow = true # 启用窗口边框透明度 frame-opacity = true # 启用 inactive 窗口透明度 inactive-opacity = true # 启用 argb 窗口的阴影 argb-shadow = true
将上述内容保存到 ~/.config/compton.conf
文件中,然后重新启动 Compton 服务以应用更改:
compton -r
Compton 通常会自动启动,但你可以通过系统服务来管理它。你可以创建一个 Systemd 服务文件来确保 Compton 在系统启动时自动运行。
sudo nano /etc/systemd/system/compton.service
[Unit] Description=Compton Window Composer After=display-manager.service [Service] Type=simple ExecStart=/usr/bin/compton --config ~/.config/compton.conf [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable compton sudo systemctl start compton
通过以上步骤,你应该能够在 Debian 系统中成功安装和配置 Compton,从而提升你的视觉体验。