From 69925ee23b8b1590f65e1f71f2d9ea5156629868 Mon Sep 17 00:00:00 2001 From: Moritz Biering Date: Wed, 5 May 2021 21:16:25 +0200 Subject: Add support for additional alpha when the term-window is not focused --- config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.h') diff --git a/config.h b/config.h index a0d8c1f..3adf598 100644 --- a/config.h +++ b/config.h @@ -108,6 +108,7 @@ unsigned int tabspaces = 8; /* bg opacity */ float alpha = 0.8; +float alphaUnfocus = 0.8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -144,6 +145,7 @@ unsigned int defaultfg = 259; unsigned int defaultbg = 258; unsigned int defaultcs = 256; unsigned int defaultrcs = 257; +unsigned int background = 258; /* * Default shape of cursor @@ -217,6 +219,7 @@ ResourcePref resources[] = { { "cwscale", FLOAT, &cwscale }, { "chscale", FLOAT, &chscale }, { "alpha", FLOAT, &alpha }, + { "alphaUnfocus", FLOAT, &alphaUnfocus }, }; /* -- cgit v1.2.3-18-g5258 From bb56685063532f732f4fbdba1d890931dad3d891 Mon Sep 17 00:00:00 2001 From: Moritz Biering Date: Thu, 6 May 2021 14:32:57 +0200 Subject: Use the additional alpha-value as offset to support a changing alpha properly --- config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index 3adf598..d6eeade 100644 --- a/config.h +++ b/config.h @@ -108,7 +108,8 @@ unsigned int tabspaces = 8; /* bg opacity */ float alpha = 0.8; -float alphaUnfocus = 0.8; +float alphaOffset = 0.0; +float alphaUnfocus; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -219,7 +220,7 @@ ResourcePref resources[] = { { "cwscale", FLOAT, &cwscale }, { "chscale", FLOAT, &chscale }, { "alpha", FLOAT, &alpha }, - { "alphaUnfocus", FLOAT, &alphaUnfocus }, + { "alphaOffset", FLOAT, &alphaOffset }, }; /* -- cgit v1.2.3-18-g5258