是的,Debian Compton 支持多显示器设置。要在 Debian 系统上配置 Compton 以支持多显示器,您可以按照以下步骤进行操作:
安装 Compton: 首先,确保您的 Debian 系统是最新的,并安装 Compton 及其依赖项。
sudo apt update && sudo apt upgrade -y
sudo apt install compton x11-xserver-utils wmctrl -y
创建或编辑 Compton 配置文件:
在您的主目录下创建一个名为 .config/compton.conf
的文件,并添加以下内容:
nano ~/.config/compton.conf
配置多显示器:
在 .compton.conf
文件中,您可以指定多个显示器的配置。以下是一个基本的配置示例,它启用了桌面合成,并设置了几个常见的选项:
backend "glx";
glx-no-stencil false;
glx-copy-from-front true;
glx-shape true;
glx-fbconfig false;
glx-hardware true;
glx-damage true;
damage true;
opacity-rule [ "class_g \"Desktop\" A", "class_g \"Gnome-terminal\" A", "class_g \"Firefox\" A" ];
shadow-exclude [ "class_g \"Desktop\"", "class_g \"Gnome-terminal\"", "class_g \"Firefox\"" ];
如果您有多个显示器,您可以添加 xrandr
命令的输出到配置文件中,以便 Compton 知道如何处理它们。例如:
xrandr-output HDMI-1 "eDP-1";
这里的 HDMI-1
和 eDP-1
是您显示器的名称,您可以通过运行 xrandr
命令来查看您的显示器名称。
运行 Compton: 配置文件准备好后,您可以通过命令行运行 Compton:
compton -c ~/.config/compton.conf
设置 Compton 开机自启动(可选):
如果您希望 Compton 在系统启动时自动运行,可以将其添加到您的窗口管理器的启动脚本中。例如,如果您使用的是 Openbox,可以编辑 Openbox 的配置文件(通常位于 ~/.config/openbox/lxde-rc.xml
或 ~/.config/openbox/lubuntu-rc.xml
),并添加以下内容:
application class "*" decor ignore name "Compton" / / decor / application
然后,启用并启动 Compton 服务:
sudo systemctl enable compton
sudo systemctl start compton
通过以上步骤,您应该能够在 Debian 系统上成功配置 Compton 以支持多显示器。