diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-08 04:20:59 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-08 04:20:59 -0400 |
commit | 6ce9e00e4eb9f3cf22b0b9fcc1fa2d84c7a10f98 (patch) | |
tree | 3411a295b9c62ddf7f1fbb015dc1b92a7b43fbe0 /config.def.h | |
parent | 4cc2f25553037554a77024fd172c6b1e4bdec1b0 (diff) |
Massive overhaul to fix the faulty statusbar
Diffstat (limited to 'config.def.h')
-rw-r--r-- | config.def.h | 108 |
1 files changed, 39 insertions, 69 deletions
diff --git a/config.def.h b/config.def.h index af958e9..0b78e6e 100644 --- a/config.def.h +++ b/config.def.h @@ -2,23 +2,29 @@ /* appearance */ static const unsigned int borderpx = 0; /* border pixel of windows */ -static const unsigned int gappx = 7; /* gap pixel between windows */ -static const unsigned int snap = 12; /* snap pixel */ +static const unsigned int gappx = 8; /* gap pixel between windows */ +static const unsigned int snap = 15; /* snap pixel */ static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ 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 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 *fonts[] = { "monospace:size=12" }; +static const char dmenufont[] = "monospace:size=12"; +static const char col_gray1[] = "#222d32"; +static const char col_gray2[] = "#343e42"; +static const char col_white[] = "#f2f1f0"; +static const char col_gray4[] = "#aaccbb"; +static const char col_cyan[] = "#42717b"; +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 }, + [SchemeNorm] = { col_white, col_gray1, col_gray2 }, [SchemeSel] = { col_gray4, col_cyan, col_cyan }, - [SchemeInactive] = { col_gray4, col_gray2, NULL }, +}; +static const unsigned int alphas[][3] = { + /* fg bg border */ + [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, + [SchemeSel] = { OPAQUE, baralpha, borderalpha }, }; /* tagging */ @@ -30,21 +36,20 @@ static const Rule rules[] = { * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ - /* class instance title tags mask iscentered isfloating isterminal noswallow monitor */ - { "Gimp", NULL, NULL, 0, 1, 0, 0, 0, -1 }, - { "Firefox", NULL, NULL, 1, 0, 0, 0, 0, -1 }, - { "St", NULL, NULL, 0, 0, 0, 1, 0, -1 }, - { "dropdown",NULL, NULL, 0, 1, 1, 0, 0, -1 }, - { NULL, NULL, "Event Tester", 0, 1, 0, 0, 1, -1 }, /* xev */ + /* class instance title tags mask iscentered isfloating isterminal noswallow monitor */ + { "Gimp", NULL, NULL, 0, 0, 1, 0, 0, -1 }, + { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1, -1 }, + { "St", NULL, NULL, 0, 0, 0, 1, -1, -1 }, + { "dropdown",NULL, NULL, 0, 1, 1, 0, 1, -1}, + { NULL, NULL, "Event Tester", 0, 0, 1, 0, 1, -1 }, /* xev */ }; -/* import layouts */ -#include "focusmaster.c" +/* include functions */ #include "gaplessgrid.c" - +#include "focusmaster.c" /* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ +static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ @@ -74,58 +79,19 @@ static const Layout layouts[] = { #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; +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_white, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +#include "movestack.c" static Key keys[] = { - /* modifier key function argument */ - /* { MODKEY, XK_p, spawn, {.v = dmenucmd } }, */ - /* { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, */ - /* { MODKEY, XK_b, togglebar, {0} }, */ - /* { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } }, */ - /* { MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } }, */ - /* { MODKEY, XK_j, focusstack, {.i = +1 } }, */ - /* { MODKEY, XK_k, focusstack, {.i = -1 } }, */ - /* { MODKEY, XK_i, incnmaster, {.i = +1 } }, */ - /* { MODKEY, XK_d, incnmaster, {.i = -1 } }, */ - /* { MODKEY, XK_h, setmfact, {.f = -0.05} }, */ - /* { MODKEY, XK_l, setmfact, {.f = +0.05} }, */ - /* { MODKEY, XK_Return, zoom, {0} }, */ - /* { MODKEY, XK_Tab, view, {0} }, */ - /* { MODKEY|ControlMask, XK_Tab, swapmon, {.i = 0} }, */ - /* { MODKEY, XK_q, killclient, {0} }, */ - /* { MODKEY|ShiftMask, XK_q, quit, {0} }, */ - /* { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, */ - /* { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, */ - /* { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, */ - /* { MODKEY|ControlMask, XK_m, setmastermon, {.i = 0} }, */ - /* { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, */ - /* { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, */ - /* { MODKEY, XK_space, setlayout, {0} }, */ - /* { 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|ShiftMask, XK_comma, tagmon, {.i = -1 } }, */ - /* { MODKEY|ControlMask, XK_comma, setmastermon, {.i = -1 } }, */ - /* { MODKEY, XK_period, focusmon, {.i = +1 } }, */ - /* { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, */ - /* { MODKEY|ControlMask, XK_period, setmastermon, {.i = +1 } }, */ - /* TAGKEYS( XK_1, 0) */ - /* TAGKEYS( XK_2, 1) */ - /* TAGKEYS( XK_3, 2) */ - /* TAGKEYS( XK_4, 3) */ - /* TAGKEYS( XK_5, 4) */ - /* TAGKEYS( XK_6, 5) */ - /* TAGKEYS( XK_7, 6) */ - /* TAGKEYS( XK_8, 7) */ - /* TAGKEYS( XK_9, 8) */ - /* MONKEYS( XK_z, 1) */ - /* MONKEYS( XK_x, 2) */ - /* MONKEYS( XK_c, 3) */ - /* MONKEYS( XK_v, 4) */ + /* All keybindings are managed by sxhkd. */ + /* The only reason a keybinding is uncommented is to prevent + * dwm from handling an empty array.*/ + /* modifier key function argument */ + { MODKEY, XK_b, togglebar, {0} }, }; /* button definitions */ @@ -135,7 +101,10 @@ static Button buttons[] = { { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} }, + { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} }, + { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} }, + { ClkStatusText, ShiftMask, Button3, sigdwmblocks, {.i = 6} }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, @@ -201,6 +170,7 @@ static Signal signals[] = { { "focusmon", focusmon }, { "focusmaster", focusmaster }, { "fullscreen", fullscreen }, + { "movestack", movestack }, { "tagmon", tagmon }, { "zoom", zoom }, { "view", view }, |