diff --git a/config.def.h b/config.def.h index c8be659..1fc0506 100644 --- a/config.def.h +++ b/config.def.h @@ -19,12 +19,14 @@ 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_green[] = "#00775d"; static const char col_urgborder[] = "#ff0000"; static const unsigned int baralpha = 0xd0; static const unsigned int borderalpha = OPAQUE; static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, + [SchemeSelMon] = { col_gray4, col_green, col_cyan }, [SchemeSel] = { col_gray4, col_cyan, col_cyan }, [SchemeUrg] = { col_gray4, col_cyan, col_urgborder }, }; diff --git a/config.h b/config.h index 858c5ff..4fae7fe 100644 --- a/config.h +++ b/config.h @@ -19,14 +19,16 @@ 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_green[] = "#384f00"; static const char col_urgborder[] = "#ff0000"; static const unsigned int baralpha = 0xd0; static const unsigned int borderalpha = OPAQUE; 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 }, + [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, + [SchemeSelMon] = { col_gray4, col_green, col_cyan }, // Colorscheme for the bar on the selected monitor + [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + [SchemeUrg] = { col_gray4, col_cyan, col_urgborder }, }; static const unsigned int alphas[][3] = { /* fg bg border */ @@ -36,7 +38,7 @@ static const unsigned int alphas[][3] = { }; /* staticstatus */ -static const int statmonval = 2; +static const int statmonval = 1; /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; @@ -94,11 +96,14 @@ static const Layout layouts[] = { static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +static const char *discord_sandboxed_mute_cmd[] = { "pkill", "--oldest", "-SIGUSR2", "discord-sand", NULL }; /* For some reason, if we do discord-sandboxed, pgrep doesn't find the program */ static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { NULL, XK_Pause, spawn, {.v = discord_sandboxed_mute_cmd } }, + { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, @@ -140,10 +145,10 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + { MODKEY, XK_comma, focusmon, {.i = +1 } }, + { MODKEY, XK_period, focusmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_comma, tagmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_period, tagmon, {.i = -1 } }, // Tags (similar to workspaces) TAGKEYS( XK_1, 0) diff --git a/dwm.c b/dwm.c index 78e9619..7dc6ebe 100644 --- a/dwm.c +++ b/dwm.c @@ -67,7 +67,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */ +enum { SchemeNorm, SchemeSelMon, SchemeSel, SchemeUrg }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ @@ -813,7 +813,12 @@ drawbar(Monitor *m) if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) continue; w = TEXTW(tags[i]); - drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + if (m == selmon) { + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSelMon : SchemeNorm]); + } + else { + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + } drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); x += w; }