DWM config, picom improvements and fix border alpha for DMW

This commit is contained in:
2024-06-03 15:01:56 +01:00
parent 86f80a314a
commit 8681901e87
6 changed files with 89 additions and 38 deletions

View File

@@ -6,41 +6,41 @@ glx-copy-from-front = false;
active-opacity = 1; active-opacity = 1;
inactive-opacity = 1; inactive-opacity = 1;
frame-opacity = 1; frame-opacity = 1;
inactive-opacity-override = false; #inactive-opacity-override = false;
blur-background = false; #blur-background = false;
#blur-background-exclude = [ #blur-background-exclude = [
# "window_type = 'dock' # "window_type = 'dock'
#] #]
blur-method = "dual_kawase"; #blur-method = "dual_kawase";
blur-strength = 8; #blur-strength = 8;
# Fading # Fading
fading = false; fading = false;
fade-delta = 2; #fade-delta = 2;
no-fading-openclose = false; #no-fading-openclose = false;
fade-exclude = [ ]; #fade-exclude = [ ];
# Other # Other
mark-wmwin-focused = true; #mark-wmwin-focused = true;
mark-ovredir-focused = true; #mark-ovredir-focused = true;
detect-rounded-corners = true; #detect-rounded-corners = true;
detect-clien-opacity = true; #detect-clien-opacity = true;
vsync = true; vsync = true;
dbe = false; dbe = false;
unredir-if-possible = false; #unredir-if-possible = false;
focus-exclude = [ ]; #focus-exclude = [ ];
detect-transient = true; #detect-transient = true;
detect-client-leader = true; #detect-client-leader = true;
# Window type settings # Window type settings
wintypes: #wintypes:
{ #{
dock = { # dock = {
shadow = false; # shadow = false;
}; # };
}; #};
# Window transparency # Window transparency
opacity-rule = [ opacity-rule = [
@@ -48,14 +48,14 @@ opacity-rule = [
]; ];
shadow = false; shadow = false;
shadow-radius = 12; #shadow-radius = 12;
shadow-offset-x = -5; #shadow-offset-x = -5;
shadow-offset-y = -5; #shadow-offset-y = -5;
shadow-opacity = 0.5; #shadow-opacity = 0.5;
shadow-green = 1.0; #shadow-green = 1.0;
shadow-exclude = [ ]; #shadow-exclude = [ ];
corner-radius = 0; #corner-radius = 0;
xrender-sync-fence = true; xrender-sync-fence = true;

View File

@@ -14,9 +14,10 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */ static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "JetBrainsMono NF:size=20" }; static const char *fonts[] = { "JetBrainsMono NF:size=20" };
static const char *colors[][3] = { static const char *colors[][3] = {
/* fg bg border */ /* fg bg border */
[SchemeNorm] = { "#ebdbb2", "#282828", "#1d2021" }, [SchemeNorm] = { "#ebdbb2", "#282828", "#1d2021" },
[SchemeSel] = { "#282828", "#ebdbb2", "#ebdbb2" }, [SchemeSel] = { "#282828", "#ebdbb2", "#ebdbb2" },
[SchemeTitle] = { "#ebdbb2", "#282828", "#1d2021" },
}; };
/* tagging */ /* tagging */
@@ -47,7 +48,7 @@ static const Layout layouts[] = {
}; };
/* key definitions */ /* key definitions */
#define MODKEY Mod1Mask #define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \ #define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \

View File

@@ -14,9 +14,10 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */ static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "JetBrainsMono NF:size=20" }; static const char *fonts[] = { "JetBrainsMono NF:size=20" };
static const char *colors[][3] = { static const char *colors[][3] = {
/* fg bg border */ /* fg bg border */
[SchemeNorm] = { "#ebdbb2", "#282828", "#1d2021" }, [SchemeNorm] = { "#ebdbb2", "#282828", "#1d2021" },
[SchemeSel] = { "#282828", "#ebdbb2", "#ebdbb2" }, [SchemeSel] = { "#282828", "#ebdbb2", "#ebdbb2" },
[SchemeTitle] = { "#ebdbb2", "#282828", "#1d2021" },
}; };
/* tagging */ /* tagging */
@@ -47,7 +48,7 @@ static const Layout layouts[] = {
}; };
/* key definitions */ /* key definitions */
#define MODKEY Mod1Mask #define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \ #define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \

View File

@@ -190,6 +190,8 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
DefaultColormap(drw->dpy, drw->screen), DefaultColormap(drw->dpy, drw->screen),
clrname, dest)) clrname, dest))
die("error, cannot allocate color '%s'", clrname); die("error, cannot allocate color '%s'", clrname);
dest->pixel |= 0xff << 24;
} }
/* Wrapper to create color schemes. The caller has to call free(3) on the /* Wrapper to create color schemes. The caller has to call free(3) on the

View File

@@ -72,7 +72,7 @@
/* enums */ /* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */ enum { SchemeNorm, SchemeSel, SchemeTitle }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck, enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMFullscreen, NetActiveWindow, NetWMWindowType,
@@ -841,7 +841,7 @@ drawbar(Monitor *m)
if ((w = m->ww - tw - stw - x) > bh) { if ((w = m->ww - tw - stw - x) > bh) {
if (m->sel) { if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); drw_setscheme(drw, scheme[m == selmon ? SchemeTitle : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
if (m->sel->isfloating) if (m->sel->isfloating)
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);

View File

@@ -0,0 +1,47 @@
From 45a45a0e67f3841d8c4aed2c52b57c2a7ddf2a9a Mon Sep 17 00:00:00 2001
From: Jack Bird <jack.bird@durham.ac.uk>
Date: Sun, 15 Aug 2021 23:15:52 +0100
Subject: [PATCH] Updated title color patch for 7162335
---
config.def.h | 1 +
dwm.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/config.def.h b/config.def.h
index a2ac963..5b9ae00 100644
--- a/config.def.h
+++ b/config.def.h
@@ -16,6 +16,7 @@ static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
+ [SchemeTitle] = { col_gray4, col_cyan, col_cyan },
};
/* tagging */
diff --git a/dwm.c b/dwm.c
index 5e4d494..73d335e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -59,7 +59,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
-enum { SchemeNorm, SchemeSel }; /* color schemes */
+enum { SchemeNorm, SchemeSel, SchemeTitle }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
@@ -731,7 +731,7 @@ drawbar(Monitor *m)
if ((w = m->ww - tw - x) > bh) {
if (m->sel) {
- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+ drw_setscheme(drw, scheme[m == selmon ? SchemeTitle : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
if (m->sel->isfloating)
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
--
2.32.0