安装Compton
通过包管理器安装,如Debian/Ubuntu系统:
sudo apt update && sudo apt install compton。
配置显示器
xrandr查看显示器名称(如HDMI-1、eDP-1)。xrandr --output eDP-1 --primary(设为主屏)xrandr --output HDMI-1 --right-of eDP-1(设为右侧扩展屏)。~/.config/lxsession/LXDE/autostart/下的脚本文件,实现开机自启。优化Compton多屏参数(可选)
编辑配置文件~/.config/compton.conf,可添加:
backend = "glx"; # 启用OpenGL加速
xrandr-output = "HDMI-1 eDP-1"; # 指定显示器(部分版本支持)
shadow-exclude = ["class_g 'Desktop'"]; # 排除桌面窗口阴影
(注:部分版本需通过xrandr单独配置显示器位置,Compton主要负责合成)。
启动Compton
运行命令:compton -c ~/.config/compton.conf,或将其加入系统启动服务。
注意:
xrandr配置显示器位置和分辨率,Compton主要负责窗口合成与特效。xrandr的--pos、--size参数细化设置。nvidia-settings)。