首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux,compton,只有一个特定的窗口是透明的。

Linux,compton,只有一个特定的窗口是透明的。
EN

Unix & Linux用户
提问于 2017-04-28 08:36:25
回答 1查看 15.4K关注 0票数 7

是否有可能配置康普顿,使只有gnome终端变得透明?无论窗口是活动的还是非活动的,它都应该是透明的。我使用i3wm作为我的wm。

这是我的compton.conf

代码语言:javascript
复制
# 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-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
    "name = 'Notification'",
    "class_g = 'Conky'",
    "class_g ?= 'Notify-osd'",
    "class_g = 'Cairo-clock'",
    "_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;

# Opacity
#menu-opacity = 0.8;
opacity-rule = ["80:class_g = 'gnome-terminal'"];
#inactive-opacity = 0.8;
#active-opacity = 1.0;
#frame-opacity = 0.7;
inactive-opacity-override = false;
alpha-step = 0.06;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box";
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
# blur-background-fixed = true;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'",
    "_GTK_FRAME_EXTENTS@:c"
];
#opacity-rule = [ "20:class_g = 'gnome-terminal'" ];

# Fading
fading = false;
# fade-delta = 30;
#fade-in-step = 0.03;
#fade-out-step = 0.03;
 no-fading-openclose = true;
 no-fading-destroyed-argb = true;
fade-exclude = [ ];

# Other
backend = "xrender";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
# use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
paint-on-overlay = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
# resize-damage = 1;

# GLX backend
# glx-no-stencil = true;
glx-copy-from-front = false;
# glx-use-copysubbuffermesa = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;

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

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-04-28 09:51:55

如果要为应用程序创建特定规则,则可以使用xprop查找WM_CLASS

代码语言:javascript
复制
$ xprop WM_CLASS <Click on gnome-terminal>
WM_CLASS(STRING) = "gnome-terminal-server", "Gnome-terminal"

这意味着你的规则必须是这样的:

代码语言:javascript
复制
opacity-rule = [ "40:class_g = 'Gnome-terminal'" ];

或者使用不区分大小写的规则:

代码语言:javascript
复制
opacity-rule = [ "40:class_g *?= 'gnome-terminal'" ];
票数 6
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/361864

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档