在 Debian 系统中配置 Compton(现在更常见的是以 picom 的形式存在,因为 Compton 已停止维护,picom 是其活跃分支),可以按照以下步骤进行。
sudo apt update
sudo apt install picom
如果你明确需要旧版
compton:
sudo apt install compton
但 强烈建议使用 picom,功能更完整、bug 更少。
mkdir -p ~/.config/picom
picom --config ~/.config/picom/picom.conf --write-pid
或者复制示例配置:
cp /usr/share/doc/picom/examples/picom.sample.conf ~/.config/picom/picom.conf
编辑配置文件:
nano ~/.config/picom/picom.conf
# 开启阴影
shadow = true;
shadow-radius = 12;
shadow-offset-x = -15;
shadow-offset-y = -15;
shadow-opacity = 0.75;
# 开启淡入淡出
fading = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
# 开启透明
transparency = true;
# 避免全屏闪烁
unredir-if-possible = true;
# 后端
backend = "glx";
vsync = true;
picom &
如果你使用 i3 / bspwm / openbox 等窗口管理器:
在 ~/.config/i3/config 中加入:
exec --no-startup-id picom
在 ~/.config/bspwm/bspwmrc 中加入:
picom &
在 ~/.config/openbox/autostart 中加入:
picom &
尝试使用 xrender 后端:
picom --backend xrender
并在配置中设置:
backend = "xrender";
NVIDIA 用户建议:
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
ps aux | grep picom
| 项目 | Compton | picom |
|---|---|---|
| 状态 | 已停止维护 | 活跃维护 |
| 功能 | 基础 | 更丰富 |
| 推荐度 | ❌ | ✅ |
如果你告诉我:
我可以给你一份 完全适配你系统的配置。