added colorbar patch along with gruvbox colors

master
Alessandro Mauri 4 years ago
parent bf0b059293
commit 53e5cb1e4a
  1. 38
      config.h
  2. 12
      dwm.c

@ -6,16 +6,40 @@ static const unsigned int snap = 16; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
static const char col_bg[] = "#282828";
/* Colors _0 means lighter version */
static const char col_bg[] = "#1d2021";
static const char col_bg_0[] = "#282828";
static const char col_orange[] = "#d65d0e";
static const char col_orange_0[] = "#fe8019";
static const char col_green[] = "#98971a";
static const char col_green_0[] = "#b8bb26";
static const char col_yellow[] = "#d79921";
static const char col_yellow_0[] = "#fabd2f";
static const char col_blue[] = "#458588";
static const char col_blue_0[] = "#83a598";
static const char col_purple[] = "#b16286";
static const char col_purple_0[] = "#d3869b";
static const char col_aqua[] = "#689d6a";
static const char col_aqua_0[] = "#8ec07c";
static const char col_fg[] = "#ebdbb2";
static const char col_bord[] = "#928374";
static const char col_selbg[] = "#458588";
static const char col_selfg[] = "#fbf1c7";
static const char col_selbord[] = "#fe8019";
static const char col_fg_0[] = "#fbf1c7";
static const char col_grey[] = "#928374";
static const char col_grey_0[] = "#a89984";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_fg, col_bg, col_bord },
[SchemeSel] = { col_selfg, col_selbg, col_selbord },
[SchemeNorm] = { col_fg, col_bg, col_grey },
[SchemeSel] = { col_grey, col_blue, col_orange },
/* Statusbar right { fg, bg, leave as-is} */
[SchemeStatus] = { col_bg, col_green, "#000000" },
/* Tagbar left selected */
[SchemeTagsSel] = { col_bg, col_aqua_0, "#000000" },
/* Tagbar left unselected */
[SchemeTagsNorm] = { col_fg_0, col_bg, "#000000" },
/* infobar middle selected */
[SchemeInfoSel] = { col_bg_0, col_purple, "#000000" },
/* infobar middle unselected */
[SchemeInfoNorm] = { col_fg, col_bg_0, "#000000" },
};
/* tagging */

12
dwm.c

@ -60,7 +60,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
@ -705,7 +705,7 @@ drawbar(Monitor *m)
/* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
drw_setscheme(drw, scheme[SchemeStatus]);
sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
}
@ -718,7 +718,7 @@ drawbar(Monitor *m)
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
if (occ & 1 << i)
drw_rect(drw, x + boxs, boxs, boxw, boxw,
@ -727,17 +727,17 @@ drawbar(Monitor *m)
x += w;
}
w = blw = TEXTW(m->ltsymbol);
drw_setscheme(drw, scheme[SchemeNorm]);
drw_setscheme(drw, scheme[SchemeTagsNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
if ((w = m->ww - sw - x) > bh) {
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
drw_setscheme(drw, scheme[m == selmon ? SchemeInfoSel : SchemeInfoNorm]);
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);
} else {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_setscheme(drw, scheme[SchemeInfoNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1);
}
}

Loading…
Cancel
Save