![如何将 Fluxbox 任务栏从 Compton(阴影)中排除?](https://linux22.com/image/997081/%E5%A6%82%E4%BD%95%E5%B0%86%20Fluxbox%20%E4%BB%BB%E5%8A%A1%E6%A0%8F%E4%BB%8E%20Compton%EF%BC%88%E9%98%B4%E5%BD%B1%EF%BC%89%E4%B8%AD%E6%8E%92%E9%99%A4%EF%BC%9F.png)
我使用 Fluxbox 作为窗口管理器,并希望使用 Compton 作为合成器。但我无法将 Fluxbox 的任务栏从 Compton 的(阴影)效果中排除。
我如何让 Compton 忽略 Fluxbox 任务栏,尤其是它的阴影效果?现在,任务栏始终具有与非活动窗口相同的视觉外观。
这是我在 compton.conf 中获得的内容:
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 10; # The blur radius for shadows. (default 12)
shadow-offset-x = 5; # The left offset for shadows. (default -15)
shadow-offset-y = 5; # The top offset for shadows. (default -15)
shadow-exclude = [
"! name~=''",
"name = 'Notification'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Do'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c"
];
# Fading
#fading = true; # Fade windows during opacity changes.
#fade-delta = 5; # The time between steps in a fade in milliseconds. (default 10).
#fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
#fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
# no-fading-openclose = true; # Fade windows in/out when opening/closing
#detect-rounded-corners = true;
### highlighted top window rest dimmed
inactive-dim = 0.2;
inactive-dim-fixed = true;
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = true; };
};
发射康普顿的命令是:
compton -C -G --config ~/.config/compton.conf
答案1
你可以使用“角色”规则。
看看我的是怎样的:
shadow-exclude =
[
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"role = 'fluxbox-toolbar'",
"_GTK_FRAME_EXTENTS@:c"
];
答案2
总结
在您的 中~/.fluxbox/init
设置:
session.screen0.toolbar.alpha: 255
细节
我遇到了同样的问题。Compton 的设置no-dock-shadow
(即参数-C
)似乎不影响 Fluxbox 的工具栏。man compton
提示了几次,窗口属性_NET_WM_WINDOW_OPACITY
可以设置透明度。
开始compton
后,我做了以下操作来验证它是否正常工作。xprop
并且compton-trans
有一个交互式函数通过单击来指定一个窗口。
$ xprop
(select toolbar)
_NET_WM_WINDOW_OPACITY(CARDINAL) = 2139062143
WM_WINDOW_ROLE(STRING) = "fluxbox-toolbar"
$ compton-trans 100
(select toolbar)
$ xprop
(select toolbar)
_NET_WM_WINDOW_OPACITY(CARDINAL) = 4294967295
WM_WINDOW_ROLE(STRING) = "fluxbox-toolbar"
注意数值的变化。由于compton-trans
可以设置工具栏透明度,因此更改 Fluxbox 配置中的不透明度(稍后 Compton 会采用该配置)似乎可行。