summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2022-02-12 10:25:30 -0600
committerzachir <zachir@librem.one>2022-02-12 10:25:30 -0600
commitb146a074f1706f95ebf3e77e72eabe4966cd47b1 (patch)
tree05900e495d5e1639cd46bf09d53282ac3dd80626
parent6a8967e71f04ff4e3bc562efd480ddc4aa12a9a1 (diff)
add urg-border patch, and change colors
-rw-r--r--config.def.h2
-rw-r--r--config.h69
-rw-r--r--dwm.c7
-rw-r--r--patches/dwm-6.2-urg-border.diff56
4 files changed, 103 insertions, 31 deletions
diff --git a/config.def.h b/config.def.h
index 14c2bd3..4901408 100644
--- a/config.def.h
+++ b/config.def.h
@@ -18,10 +18,12 @@ 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_urgborder[] = "#ff0000";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
+ [SchemeUrg] = { col_gray4, col_cyan, col_urgborder },
};
typedef struct {
diff --git a/config.h b/config.h
index e55f95b..a2f923d 100644
--- a/config.h
+++ b/config.h
@@ -2,6 +2,10 @@
#include <X11/XF86keysym.h>
+static const char normfgcolor[] = "#bbbbbb";
+static const char selbordercolor[] = "#005577";
+static const char selbgcolor[] = "#005577";
+static const char urgbordercolor[] = "#ff0000";
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int gappx = 6; /* gaps between windows */
@@ -13,42 +17,47 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
-static const char *fonts[] = { "mononoki Nerd Font Mono:size=10", "JoyPixels:size=9" };
-static const char dmenufont[] = "mononoki Nerd Font Mono:size=10";
-static const char col_gray1[] = "#000000";
-static const char col_gray2[] = "#000000";
-static const char col_gray3[] = "#bbbbbb";
-static const char col_gray4[] = "#eeeeee";
-static const char col_cyan[] = "#ffffff";
+static const char *fonts[] = { "mononoki Nerd Font Mono:size=12", "symbola:size=10" };
+static const char dmenufont[] = "mononoki Nerd Font Mono:size=12";
+static const char col_gray1[] = "#151219";
+static const char col_gray2[] = "#6e6f6c";
+static const char col_gray3[] = "#898883";
+static const char col_gray4[] = "#c5c3bc";
+static const char col_cyan[] = "#2783a1";
+static const char col_other[] = "#675f58";
+
static const char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
- [SchemeSel] = { col_gray1, col_cyan, col_cyan },
+ /* fg bg border */
+ [SchemeNorm] = { col_gray4, col_gray1, col_gray3 }, // unfocused wins
+ [SchemeSel] = { col_gray4, col_gray2, col_gray4 }, // the focused win
+ [SchemeUrg] = { col_gray4, col_gray1, col_other },
};
typedef struct {
const char *name;
const void *cmd;
} Sp;
-const char *spcmd1[] = { "st", "-g", "100x33", "-c", "sphtop", "-e", "htop", NULL };
-const char *spcmd2[] = { "st", "-g", "100x33", "-c", "spterm", NULL };
-const char *spcmd3[] = { "st", "-g", "100x33", "-c", "sppmxr", "-e", "pulsemixer", NULL };
-const char *spcmd4[] = { "st", "-g", "100x33", "-c", "spxmrw", "-e", "xmrzachir", NULL };
-const char *spcmd5[] = { "st", "-g", "100x33", "-c", "spncmp", "-e", "ncmpcpp", NULL };
-const char *spcmd6[] = { "st", "-g", "100x33", "-c", "spmutt", "-e", "zsh", "-c", "neomutt", NULL };
-const char *spcmd7[] = { "st", "-g", "100x33", "-c", "spxmpp", "-e", "profanity", NULL };
-const char *spcmd8[] = { "st", "-g", "100x33", "-c", "spircc", "-e", "irssi", NULL };
-const char *spcmd9[] = { "st", "-g", "100x33", "-c", "sptrem", "-e", "tremc", NULL };
+const char *spcmd01[] = { "st", "-g", "100x33", "-c", "sphtop", "-e", "htop", NULL };
+const char *spcmd02[] = { "st", "-g", "100x33", "-c", "spterm", NULL };
+const char *spcmd03[] = { "st", "-g", "100x33", "-c", "sppmxr", "-e", "pulsemixer", NULL };
+const char *spcmd04[] = { "st", "-g", "100x33", "-c", "spxmrw", "-e", "xmrzachir", NULL };
+const char *spcmd05[] = { "st", "-g", "100x33", "-c", "spncmp", "-e", "ncmpcpp", NULL };
+const char *spcmd06[] = { "st", "-g", "100x33", "-c", "spmutt", "-e", "zsh", "-c", "neomutt", NULL };
+const char *spcmd07[] = { "st", "-g", "100x33", "-c", "spxmpp", "-e", "profanity", NULL };
+const char *spcmd08[] = { "st", "-g", "100x33", "-c", "spircc", "-e", "irssi", NULL };
+const char *spcmd09[] = { "st", "-g", "100x33", "-c", "spmatr", "-e", "weechat", NULL };
+const char *spcmd10[] = { "st", "-g", "100x33", "-c", "sptrem", "-e", "tremc", NULL };
static Sp scratchpads[] = {
- { "sphtop", spcmd1 },
- { "spterm", spcmd2 },
- { "sppmxr", spcmd3 },
- { "spxmrw", spcmd4 },
- { "spncmp", spcmd5 },
- { "spmutt", spcmd6 },
- { "spxmpp", spcmd7 },
- { "spircc", spcmd8 },
- { "sptrem", spcmd9 },
+ { "sphtop", spcmd01 },
+ { "spterm", spcmd02 },
+ { "sppmxr", spcmd03 },
+ { "spxmrw", spcmd04 },
+ { "spncmp", spcmd05 },
+ { "spmutt", spcmd06 },
+ { "spxmpp", spcmd07 },
+ { "spircc", spcmd08 },
+ { "spmatr", spcmd09 },
+ { "sptrem", spcmd10 },
};
/* tagging */
@@ -92,7 +101,8 @@ static const Rule rules[] = {
{ "spmutt", NULL, NULL, SPTAG(5), 1, 1, 1, -1 },
{ "spxmpp", NULL, NULL, SPTAG(6), 1, 1, 1, -1 },
{ "spircc", NULL, NULL, SPTAG(7), 1, 1, 1, -1 },
- { "sptrem", NULL, NULL, SPTAG(8), 1, 1, 1, -1 },
+ { "spmatr", NULL, NULL, SPTAG(8), 1, 1, 1, -1 },
+ { "sptrem", NULL, NULL, SPTAG(9), 1, 1, 1, -1 },
{ NULL, "monero-wallet-gui",NULL, 256, 1, 0, 0, -1 },
};
@@ -165,6 +175,7 @@ static Key keys[] = {
{ MODKEY|ControlMask, XK_s, togglescratch, {.ui = 6 } },
{ MODKEY|ControlMask, XK_d, togglescratch, {.ui = 7 } },
{ MODKEY|ControlMask, XK_f, togglescratch, {.ui = 8 } },
+ { MODKEY|ControlMask, XK_g, togglescratch, {.ui = 9 } },
{ MODKEY, XK_Escape, spawn, {.v = sxhkdsig } },
// { 0, XF86XK_AudioPlay, spawn, {.v = mpdtoggle } },
// { 0, XF86XK_AudioNext, spawn, {.v = mpdnext } },
diff --git a/dwm.c b/dwm.c
index 7a9aee6..a049ff4 100644
--- a/dwm.c
+++ b/dwm.c
@@ -80,7 +80,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
-enum { SchemeNorm, SchemeSel }; /* color schemes */
+enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
@@ -2829,8 +2829,11 @@ updatewmhints(Client *c)
if (c == selmon->sel && wmh->flags & XUrgencyHint) {
wmh->flags &= ~XUrgencyHint;
XSetWMHints(dpy, c->win, wmh);
- } else
+ } else {
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
+ if (c->isurgent)
+ XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
+ }
if (wmh->flags & InputHint)
c->neverfocus = !wmh->input;
else
diff --git a/patches/dwm-6.2-urg-border.diff b/patches/dwm-6.2-urg-border.diff
new file mode 100644
index 0000000..53f4d86
--- /dev/null
+++ b/patches/dwm-6.2-urg-border.diff
@@ -0,0 +1,56 @@
+From f20e5593e154e7e46c3f7100bd1378c7844b5ec8 Mon Sep 17 00:00:00 2001
+From: Dirk Leichsenring <dlei@reddott.de>
+Date: Sun, 21 Jun 2020 14:00:40 +0200
+Subject: [PATCH] Make the borders of urgent windows a different color - for dwm 6.2
+
+---
+ config.def.h | 2 ++
+ dwm.c | 7 +++++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..1cb4492 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -12,10 +12,12 @@ 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_urgborder[] = "#ff0000";
+ static const char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
++ [SchemeUrg] = { col_gray4, col_cyan, col_urgborder },
+ };
+
+ /* tagging */
+diff --git a/dwm.c b/dwm.c
+index 4465af1..fda4013 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, SchemeUrg }; /* color schemes */
+ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+ NetWMFullscreen, NetActiveWindow, NetWMWindowType,
+ NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+@@ -2022,8 +2022,11 @@ updatewmhints(Client *c)
+ if (c == selmon->sel && wmh->flags & XUrgencyHint) {
+ wmh->flags &= ~XUrgencyHint;
+ XSetWMHints(dpy, c->win, wmh);
+- } else
++ } else {
+ c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
++ if (c->isurgent)
++ XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
++ }
+ if (wmh->flags & InputHint)
+ c->neverfocus = !wmh->input;
+ else
+--
+2.27.0
+