diff --git a/config.def.h b/config.def.h index 594e149..80b7050 100644 --- a/config.def.h +++ b/config.def.h @@ -3,35 +3,43 @@ /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int gappx = 6; /* gaps between windows */ -static const unsigned int snap = 32; /* snap pixel */ -static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ +static const unsigned int snap = 16; /* snap pixel */ +static const unsigned int systraypinning = 1; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayspacing = 2; /* systray spacing */ -static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ +static const int systraypinningfailfirst = 0; /* 1: if pinning fails, display systray on the first monitor, False: display systray on + the last monitor*/ 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[] = { "monospace:size=10" }; -static const char dmenufont[] = "monospace:size=10"; +static const int topbar = 0; /* 0 means bottom bar */ +static const char *fonts[] = { "Hack:size=10" }; +static const char dmenufont[] = "Hack:size=10"; static const char col_gray1[] = "#222222"; 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_gruvbox_bg0[] = "#282828"; +static const char col_gruvbox_bg0_h[] = "#1d2021"; +static const char col_gruvbox_fg[] = "#ebdbb2"; +static const char col_gruvbox_fg0[] = "#fbf1c7"; +static const char col_gruvbox_yellow[] = "#fabd2f"; +static const char col_gruvbox_purple_dark[] = "#b16286"; +static const char col_gruvbox_purple[] = "#d3869b"; static const unsigned int baralpha = 0xd0; -static const unsigned int borderalpha = OPAQUE; +static const unsigned int borderalpha = 0xd0; static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + /* fg bg border */ + [SchemeNorm] = { col_gruvbox_fg0, col_gruvbox_bg0, col_gruvbox_purple }, + [SchemeSel] = { col_gruvbox_fg, col_gruvbox_bg0_h, col_gruvbox_purple_dark }, }; static const unsigned int alphas[][3] = { - /* fg bg border */ - [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, - [SchemeSel] = { OPAQUE, baralpha, borderalpha }, + /* fg bg border */ + [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, + [SchemeSel] = { OPAQUE, baralpha, borderalpha }, }; /* tagging */ -static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; +static const char *tags[] = { "(", "ノ", "◕", "ヮ", "◕", ")", "ノ", "゚*", "。" }; static const Rule rules[] = { /* xprop(1): @@ -40,27 +48,27 @@ static const Rule rules[] = { */ /* class instance title tags mask isfloating monitor */ { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ +static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ -static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ +static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ static const int attachbelow = 1; /* 1 means attach after the currently active window */ +void col(Monitor *m); + static const Layout layouts[] = { /* symbol arrange function */ { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ + { "><>", NULL }, /* no layout function means floating behavior */ { "[M]", monocle }, - { "|M|", centeredmaster }, - { ">M>", centeredfloatingmaster }, - { "|||", col }, + { "|M|", centeredmaster }, + { ">M>", centeredfloatingmaster }, }; /* key definitions */ -#define MODKEY Mod4Mask +#define MODKEY Mod1Mask #define TAGKEYS(KEY,TAG) \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ @@ -72,8 +80,10 @@ static const Layout layouts[] = { /* commands */ 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 *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gruvbox_bg0_h, "-nf", col_gruvbox_fg, "-sb", col_gruvbox_purple_dark, "-sf", col_gruvbox_fg0, NULL }; static const char *termcmd[] = { "st", NULL }; +static const char *emacscmd[] = { "emacsclient", "-c", "-n", NULL }; +static const char *frontcmd[] = { "front", NULL }; static Key keys[] = { /* modifier key function argument */ @@ -86,15 +96,19 @@ static Key keys[] = { { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} }, + { MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} }, + { MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} }, { MODKEY, XK_Return, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY|ShiftMask, XK_f, spawn, {.v = frontcmd } }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, - { MODKEY, XK_c, setlayout, {.v = &layouts[5]} }, + { MODKEY, XK_e, spawn, {.v = emacscmd } }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, @@ -132,3 +146,28 @@ static Button buttons[] = { { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; +void +col(Monitor *m) { + unsigned int i, n, h, w, x, y,mw; + Client *c; + + for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); + if(n == 0) + return; + if(n > m->nmaster) + mw = m->nmaster ? m->ww * m->mfact : 0; + else + mw = m->ww; + for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { + if(i < m->nmaster) { + w = (mw - x) / (MIN(n, m->nmaster)-i); + resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False); + x += WIDTH(c); + } + else { + h = (m->wh - y) / (n - i); + resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False); + y += HEIGHT(c); + } + } +}