在Debian系统中配置Compton以支持多显示器涉及几个步骤。以下是一个基本的配置指南:
首先,确保你的Debian系统是最新的:
sudo apt update && sudo apt upgrade -y
然后,安装Compton和相关的依赖项:
sudo apt install compton x11-xserver-utils wmctrl -y
在你的主目录下创建一个名为 .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 -c /.compton.conf
如果你想要让Compton在启动时自动运行,你可以将它添加到你的窗口管理器的启动脚本中。
请注意,Compton的配置选项非常多,你可以根据自己的需求进行调整。上面的配置只是一个起点,你可能需要根据你的具体设置和需求进行调整。更多关于Compton配置的信息,你可以查看它的官方文档或GitHub仓库。