From 6e4ba80d9b1059f67116486f05cab98e04d4612e Mon Sep 17 00:00:00 2001 From: rafa_99 Date: Wed, 6 Jul 2022 01:55:08 +0100 Subject: Unfocused window opacity --- picom/.config/picom/picom.conf | 6 ++---- suckless/.config/suckless/dwm/config.h | 11 +++++++---- suckless/.config/suckless/st/config.h | 3 --- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index 7c93c1b..8ac36b8 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -103,12 +103,10 @@ fade-out-step = 0.03; # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) -# inactive-opacity = 1 -inactive-opacity = 0.8; +# inactive-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) -# frame-opacity = 1.0 -frame-opacity = 0.7; +# frame-opacity = 0.7; # Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. # inactive-opacity-override = true diff --git a/suckless/.config/suckless/dwm/config.h b/suckless/.config/suckless/dwm/config.h index f7ee5b5..9f6b8b0 100644 --- a/suckless/.config/suckless/dwm/config.h +++ b/suckless/.config/suckless/dwm/config.h @@ -3,7 +3,7 @@ #include "colors.h" /* appearance */ -static const unsigned int borderpx = 2; /* border pixel of windows */ +static const unsigned int borderpx = 0; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int gappih = 10; /* horiz inner gap between windows */ static const unsigned int gappiv = 10; /* vert inner gap between windows */ @@ -15,7 +15,9 @@ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const int vertpad = 10; /* vertical padding of bar */ static const int sidepad = 10; /* horizontal padding of bar */ -static const int focusonwheel = 0; +static const double activeopacity = 1.0f; /* Window opacity when it's focused (0 <= opacity <= 1) */ +static const double inactiveopacity = 0.5f; /* Window opacity when it's inactive (0 <= opacity <= 1) */ +static Bool bUseOpacity = True; /* Starts with opacity on any unfocused windows */ static const char *fonts[] = { "CaskaydiaCove Nerd Font:pixelsize=16" }; static const char *colors[][3] = { /* fg bg border */ @@ -89,6 +91,7 @@ static Key keys[] = { { MODKEY|CTRLKEY, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } }, { MODKEY|CTRLKEY, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } }, { MODKEY|CTRLKEY, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } }, + { MODKEY, XK_a, toggleopacity, {0} }, /* Managing Gaps */ { MODKEY|ALTKEY, XK_period, incrgaps, {.i = +1 } }, @@ -151,8 +154,8 @@ static Key keys[] = { { MODKEY, XK_F2, spawn, SHCMD("mixer -") },//Decrease Volume by 5% { MODKEY, XK_F3, spawn, SHCMD("mixer +") },//Increase Volume by 5% { MODKEY, XK_F4, spawn, SHCMD("mixer m") },//Toggle Mic Mute - { MODKEY, XK_F5, spawn, SHCMD("backlightctl -") },//Decrease Brightness by 5% - { MODKEY, XK_F6, spawn, SHCMD("backlightctl +") },//Increase Brightness by 5% + { MODKEY, XK_F5, spawn, SHCMD("doas light -U 5") },//Decrease Brightness by 5% + { MODKEY, XK_F6, spawn, SHCMD("doas light -A 5") },//Increase Brightness by 5% { MODKEY, XK_F7, spawn, SHCMD("bluelight") },//Toggle Bluelight Filter { MODKEY, XK_F8, spawn, SHCMD("screenrecord") },//Screen Recording Script { MODKEY, XK_F9, spawn, SHCMD("mpc toggle") },//Music Pause/Play diff --git a/suckless/.config/suckless/st/config.h b/suckless/.config/suckless/st/config.h index e134886..0517df6 100644 --- a/suckless/.config/suckless/st/config.h +++ b/suckless/.config/suckless/st/config.h @@ -110,9 +110,6 @@ char *termname = "st-256color"; */ unsigned int tabspaces = 8; -/* bg opacity */ -float alpha = 0.8; - #include "colors.h" /* -- cgit v1.2.3