diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-11 00:13:14 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-11 00:13:14 +0200 |
commit | 8fea4e55cda7ee8f6263271dc718901d5fa85bbf (patch) | |
tree | c97cd69213250fe7ad3403cb1589ce73026f5f7b | |
parent | Updated status bar (diff) | |
download | dwm-8fea4e55cda7ee8f6263271dc718901d5fa85bbf.tar.gz dwm-8fea4e55cda7ee8f6263271dc718901d5fa85bbf.tar.bz2 dwm-8fea4e55cda7ee8f6263271dc718901d5fa85bbf.zip |
Added separation of colors in config.h for title bar [Patch]
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | dwm.c | 4 | ||||
-rw-r--r-- | patches/dwm-titlecolor-20190206-6.2.diff | 54 |
3 files changed, 60 insertions, 2 deletions
diff --git a/config.h b/config.h index a454afb..52eb8ad 100644 --- a/config.h +++ b/config.h @@ -20,11 +20,15 @@ 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 }, + }; static const unsigned int alphas[][3] = { /* fg bg border */ [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, [SchemeSel] = { OPAQUE, baralpha, borderalpha }, + [SchemeTitle]= { OPAQUE, baralpha, borderalpha}, + }; /* tagging */ diff --git a/dwm.c b/dwm.c index e6686fc..60393f3 100644 --- a/dwm.c +++ b/dwm.c @@ -61,7 +61,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, NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop, NetLast }; /* EWMH atoms */ @@ -760,7 +760,7 @@ drawbar(Monitor *m) if ((w = m->ww - sw - 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); diff --git a/patches/dwm-titlecolor-20190206-6.2.diff b/patches/dwm-titlecolor-20190206-6.2.diff new file mode 100644 index 0000000..18c3e39 --- /dev/null +++ b/patches/dwm-titlecolor-20190206-6.2.diff @@ -0,0 +1,54 @@ +From b15016b717c88eb378d87703dcf2169b6059047c Mon Sep 17 00:00:00 2001 +From: knary <theknary@gmail.com> +Date: Wed, 6 Feb 2019 21:44:19 -0500 +Subject: [PATCH] Adds title bar color scheme, seperating it from SchemeSel. + +--- + 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 1c0b587..48e7ace 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 }, + }; + + static const unsigned int alphas[][3] = { + /* fg bg border */ + [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, + [SchemeSel] = { OPAQUE, baralpha, borderalpha }, + +[SchemeTitle]= { OPAQUE, baralpha, borderalpha}, + + }; + + /* tagging */ +diff --git a/dwm.c b/dwm.c +index 4465af1..216e1f3 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 */ +@@ -730,7 +730,7 @@ drawbar(Monitor *m) + + if ((w = m->ww - sw - 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.20.1 |