如何從 Compton 排除 Fluxbox 工作列(陰影)?

如何從 Compton 排除 Fluxbox 工作列(陰影)?

我使用 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 的命令是:

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多次暗示 window 屬性_NET_WM_WINDOW_OPACITY可以設定透明度。

啟動後compton,我執行了以下操作來驗證它是否正常工作。xpropcompton-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 選取)似乎可行。

相關內容