summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig4
-rw-r--r--config.h5
-rw-r--r--dwm.c13
-rw-r--r--kconfig.h1
4 files changed, 23 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig
index 5e643a2..c1a3034 100644
--- a/Kconfig
+++ b/Kconfig
@@ -7,3 +7,7 @@ config DWM_PERTAG
config DWM_ALTERNATIVETAGS
bool "Alternative names for tags"
default n
+
+config DWM_URGBORDER
+ bool "Change urgent message color"
+ default n \ No newline at end of file
diff --git a/config.h b/config.h
index 5398aec..55eb463 100644
--- a/config.h
+++ b/config.h
@@ -12,10 +12,15 @@ static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
+static const char col_red1[] = "#ff0000";
+
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
+#ifdef CONFIG_DWM_URGBORDER
+ [SchemeUrg] = { col_red1, col_red1, col_red1 },
+#endif
};
/* tagging */
diff --git a/dwm.c b/dwm.c
index 2ce630f..0a1e33e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -61,7 +61,11 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+#ifdef CONFIG_DWM_URGBORDER
+enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
+#else
enum { SchemeNorm, SchemeSel }; /* color schemes */
+#endif
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
@@ -2179,6 +2183,15 @@ updatewmhints(Client *c)
XSetWMHints(dpy, c->win, wmh);
} else
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
+ /******************************************************************/
+ #ifdef CONFIG_DWM_URGBORDER
+ if (c->isurgent)
+ {
+ //XSetWindowBorder(dpy, c->win, scheme[SchemeUrg].border->pix);
+ XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
+ }
+ #endif
+ /******************************************************************/
if (wmh->flags & InputHint)
c->neverfocus = !wmh->input;
else
diff --git a/kconfig.h b/kconfig.h
index 4d487fc..560e218 100644
--- a/kconfig.h
+++ b/kconfig.h
@@ -4,4 +4,5 @@
#define CONFIG_DEBUG_PRINT_DEBUG
#define CONFIG_DWM_PERTAG
#define CONFIG_DWM_ALTERNATIVETAGS
+#define CONFIG_DWM_URGBORDER
#endif