在 Debian 上通过 Compton(或已演进为 Picom) 开启窗口特效,一般流程如下。
Debian 较新版本中,Compton 多已改名为 picom,推荐直接安装 picom:
sudo apt update
sudo apt install picom
如果你想用旧版 compton(不推荐):
sudo apt install compton
Compton / Picom 通常配合以下窗口管理器使用:
例如(Openbox):
sudo apt install openbox
⚠️ 如果你用的是 GNOME / KDE,它们自带合成器,不需要 Compton。
mkdir -p ~/.config/picom
picom --example-config > ~/.config/picom/picom.conf
(compton 用户用 ~/.config/compton.conf)
编辑 ~/.config/picom/picom.conf:
# 阴影
shadow = true;
shadow-radius = 12;
shadow-offset-x = -2;
shadow-offset-y = -2;
shadow-opacity = 0.5;
# 透明度
inactive-opacity = 0.9;
active-opacity = 1.0;
frame-opacity = 1.0;
# 淡入淡出
fade = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
# 模糊(需要支持)
blur-method = "gaussian";
blur-strength = 10;
# 圆角
corner-radius = 8;
picom &
或(compton):
compton &
编辑 ~/.config/openbox/autostart:
picom &
ps aux | grep picom
如果看到进程,且窗口有阴影 / 透明 / 圆角,说明成功。
尝试关闭模糊:
blur-method = "none";
添加:
backend = "glx";
vsync = true;
Compton / Picom 不支持 Wayland,只能用 X11。
如果你告诉我:
我可以给你一份可直接用的配置。