在 Linux 中 Compton 是一个老牌的 X11 合成管理器(现在多数发行版已改用 picom),启动方式如下:
compton --version
或(新系统)
picom --version
如果没安装:
sudo apt install compton
或新版:
sudo apt install picom
sudo pacman -S compton
或
sudo pacman -S picom
sudo dnf install compton
compton &
或(新版)
picom &
&表示后台运行
compton --config ~/.config/compton.conf &
或
picom --config ~/.config/picom.conf &
如果没有配置文件,可以先生成默认配置:
compton --show-all-options
.xinitrc(startx 用户)编辑 ~/.xinitrc:
compton &
exec dwm
或:
picom &
在 ~/.config/i3/config 中:
exec --no-startup-id compton
或:
exec --no-startup-id picom
killall compton
或
killall picom
尝试关闭某些特效:
compton --backend glx --vsync none
说明你用的是新系统,直接用:
picom
Compton / picom 只支持 X11,Wayland 不需要也不支持。
# 启动
compton &
# 或
picom &
# 开机自启
echo "picom &" >> ~/.xinitrc
如果你用的是 i3 / bspwm / openbox / dwm,可以告诉我,我可以给你一份完整可用的配置示例。