Compton 是一个轻量级的 X11 窗口合成管理器(常见于 i3、Openbox 等平铺/轻量桌面环境),后来演进为 picom(Compton 的 fork)。下面按常用类别列出 Compton 支持的主要参数/配置项(命令行参数与配置文件基本一一对应)。
compton [选项]
| 参数 | 说明 |
|---|---|
-b / --daemon |
以守护进程方式运行 |
-c / --shadow |
启用阴影 |
-r 半径 |
阴影模糊半径 |
-o 透明度 |
阴影透明度(0–1) |
-l x偏移 |
阴影水平偏移 |
-t y偏移 |
阴影垂直偏移 |
-f / --fading |
启用淡入淡出 |
-D 毫秒 |
淡入淡出时间 |
| 参数 | 说明 |
|---|---|
-i 透明度 |
非活跃窗口透明度 |
-e 透明度 |
非活跃窗口边框透明度 |
-a 透明度 |
整体窗口透明度(不常用) |
| 参数 | 说明 |
|---|---|
--shadow-red |
阴影红色分量 |
--shadow-green |
阴影绿色分量 |
--shadow-blue |
阴影蓝色分量 |
--shadow-exclude |
排除阴影的窗口 |
Compton 大多数功能通过配置文件设置,常见字段如下:
shadow = true;
shadow-radius = 12;
shadow-opacity = 0.5;
shadow-offset-x = -2;
shadow-offset-y = -2;
shadow-exclude = [ "class_g = 'Notify-osd'" ];
fading = true;
fade-delta = 5;
fade-in-step = 0.03;
fade-out-step = 0.03;
inactive-opacity = 0.8;
active-opacity = 1.0;
frame-opacity = 1.0;
backend = "glx"; # 或 xrender
glx-no-stencil = true;
glx-copy-from-front = false;
vsync = "opengl-swc";
opacity-rule = [
"90:class_g = 'URxvt'",
"80:class_g = 'Firefox'"
];
unredir-if-possible = true;
unredir-if-possible-exclude = [ "class_g = 'MPlayer'" ];
compton --diagnostics
compton -d :0
compton --log-level debug
blur-method、blur-strength、rounded-corners)如果你需要:
可以直接告诉我你的使用场景。