温馨提示×

debian compton如何开启特效

小樊
41
2026-09-17 02:08:30
栏目: 智能运维

在 Debian 上通过 Compton(或已演进为 Picom) 开启窗口特效,一般流程如下。


一、安装 Compton / Picom

Debian 较新版本中,Compton 多已改名为 picom,推荐直接安装 picom:

sudo apt update
sudo apt install picom

如果你想用旧版 compton(不推荐):

sudo apt install compton

二、确认你使用的是非合成窗口管理器

Compton / Picom 通常配合以下窗口管理器使用:

  • Openbox
  • i3
  • awesome
  • bspwm
  • fluxbox

例如(Openbox):

sudo apt install openbox

⚠️ 如果你用的是 GNOME / KDE,它们自带合成器,不需要 Compton。


三、创建配置文件(开启特效)

1. 生成默认配置

mkdir -p ~/.config/picom
picom --example-config > ~/.config/picom/picom.conf

(compton 用户用 ~/.config/compton.conf)


2. 开启常见特效(示例)

编辑 ~/.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

手动启动

picom &

或(compton):

compton &

开机自启(以 Openbox 为例)

编辑 ~/.config/openbox/autostart:

picom &

五、检查是否生效

ps aux | grep picom

如果看到进程,且窗口有阴影 / 透明 / 圆角,说明成功。


六、常见问题

1. 黑屏 / 卡顿

尝试关闭模糊:

blur-method = "none";

2. NVIDIA 显卡

添加:

backend = "glx";
vsync = true;

3. Wayland

Compton / Picom 不支持 Wayland,只能用 X11。


如果你告诉我:

  • 使用的 窗口管理器(i3 / openbox / awesome)
  • 是否是 NVIDIA 显卡
  • Debian 版本

我可以给你一份可直接用的配置。

0 踩