温馨提示×

debian compton如何开启模糊

小樊
39
2026-09-14 02:12:02
栏目: 智能运维

在 Debian 上给 Compton(现为 picom) 开启窗口模糊,核心就是修改配置文件并启用 blur 相关选项。下面按常见情况说明。


一、确认你用的是 compton 还是 picom

Debian 里很多教程说的 “compton” 现在基本是 picom(compton 的 fork):

which compton picom
  • picom → 用 picom
  • 只有 compton → 用 compton(配置基本通用)

下文以 picom 为例(compton 同理)。


二、安装 picom(如未安装)

sudo apt update
sudo apt install picom

三、创建/编辑配置文件

用户级配置:

mkdir -p ~/.config/picom
nano ~/.config/picom/picom.conf

四、开启模糊的最小配置示例

# 是否作为后台进程
backend = "glx";

# 开启模糊
blur:
{
  method = "gaussian";
  size = 10;
  deviation = 5.0;
};

# 透明窗口也模糊
blur-background = true;
blur-background-frame = true;

# 示例:只对非聚焦窗口模糊(可选)
# blur-background-exclude = [];

常用模糊参数说明

  • methodgaussian(最常用)
  • size:模糊半径(越大越糊)
  • deviation:高斯标准差

五、启动 picom

picom --config ~/.config/picom/picom.conf

或后台运行:

picom -b

六、在窗口管理器里自动启动(示例)

i3

~/.config/i3/config 中:

exec --no-startup-id picom -b

Openbox

~/.config/openbox/autostart

picom -b &

七、只对“未聚焦窗口”模糊(推荐)

blur-background-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'"
];

或只模糊透明背景:

blur-background = true;

八、常见问题

1. 模糊没效果?

  • 确认用 glxxrender backend
  • 某些 DE(如 GNOME)不兼容,建议用 i3 / Openbox / Awesome

2. 性能差?

  • 减小 size
  • 使用 method = "box"(更快但丑)

3. Debian 旧版 compton?

配置名可能叫 blur-background = true,无 blur:


如果你告诉我:

  • 用的 桌面环境 / 窗口管理器
  • compton 还是 picom
  • Debian 版本

我可以给你一份完全适配你的配置文件

0