add default transparency for windows and rules for override the transparency

This commit is contained in:
Leonardo Hernández Hernández 2023-07-25 12:48:22 -06:00
parent 6838f909bd
commit 86b1e752db
No known key found for this signature in database
GPG key ID: E538897EE11B9624
2 changed files with 42 additions and 3 deletions

View file

@ -12,6 +12,7 @@ static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff);
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */
static const float default_opacity = 0.75;
/* tagging - TAGCOUNT must be no greater than 31 */
#define TAGCOUNT (9)
@ -20,11 +21,12 @@ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can al
static int log_level = WLR_ERROR;
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
/* app_id title tags mask isfloating alpha monitor */
/* examples:
{ "Gimp", NULL, 0, 1, -1 },
{ "Gimp", NULL, 0, 1, default_alpha, -1 },
{ "Alacritty",NULL, 1 << 2, 0, 1.0, -1 },
*/
{ "firefox", NULL, 1 << 8, 0, -1 },
{ "firefox", NULL, 1 << 8, 0, default_opacity, -1 },
};
/* layout(s) */
@ -126,6 +128,8 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} },
{ MODKEY, XKB_KEY_o, setopacity, {.f = +0.1} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_O, setopacity, {.f = -0.1} },
{ MODKEY, XKB_KEY_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },