compton 配置 i3 的选项卡/堆叠模式下的透明度

compton 配置 i3 的选项卡/堆叠模式下的透明度

我在尝试着:

  1. 使某些应用程序透明使用,compton例如i3wm
  2. 在选项卡式/堆叠模式下,i3wm底层窗口被隐藏(或未绘制)。

为了举例,我们将应用程序设为zathura

我在我的中尝试了以下操作compton.conf

opacity-rule = [
"90:class_g = 'Zathura' && !_NET_WM_STATE@:32a",
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
]

这不会使其zathura透明,但zathura如果它位于选项卡式/堆叠窗口中的任何其他透明窗口下方,则会被隐藏。

接下来我尝试了以下操作compton.conf

opacity-rule = [
"90:class_g = 'Zathura'",
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
]

这确实使其变得zathura透明,但是zathura在选项卡式或堆叠模式下,它会绘制在其他窗口下方i3wm

我发现并尝试了建议的解决方案。也就是说,我"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"

"0:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_HIDDEN'",
"0:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_HIDDEN'",
"0:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_HIDDEN'",
"0:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_HIDDEN'",
"0:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_HIDDEN'"

但这并没有什么变化。请帮忙。

=========================================

我的全部compton.conf内容如下:

menu        = { shadow = false; };
dropdown_menu = { shadow = false; };
popup_menu    = { shadow = false; };
utility       = { shadow = false; };

# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-exclude = [
       "class_g = 'i3-frame'",
       "class_g = 'keynav'",           
       "name = 'Notification'",
       "class_g ?= 'Notify-osd'",
       "_GTK_FRAME_EXTENTS@:c"
];


opacity-rule = [
# "90:class_g = 'Zathura'",
"90:class_g = 'Zathura' && !_NET_WM_STATE@:32a",

# "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
"0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'"
,"0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'"
,"0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'"
,"0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'"
,"0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'"
];

# Fading
fading = true;
fade-delta = 5;
fade-in-step = 0.03;
fade-out-step = 0.03;
fade-exclude = [ ];

# Other
backend = "xrender";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];

# GLX backend
glx-copy-from-front = false;
glx-swap-method = "undefined";

# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; };
};

相关内容