dwm

my build of dwm
git clone git://git.hanetzok.net/dwm
Log | Files | Refs | README | LICENSE

commit 0a238238c65caa4a1c240585d88ed6795b3f0a46
parent c454221343db2c1a7590c4cd67f8678d0df284f5
Author: Markus Hanetzok <m.hanetzok@sotronix.de>
Date:   Tue, 10 Jun 2025 13:44:49 +0200

update color theme and fix formatting

Diffstat:
Mconfig.def.h | 207++++++++++++++++++++++++++++++++++++++++---------------------------------------
1 file changed, 104 insertions(+), 103 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -3,32 +3,32 @@ #include <X11/XF86keysym.h> /* appearance */ -static const unsigned int borderpx = 2; /* border pixel of windows */ -static const unsigned int snap = 32; /* snap pixel */ +static const unsigned int borderpx = 2; /* border pixel of 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 systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ +static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ 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 showsystray = 1; /* 0 means no systray */ -static const unsigned int gappih = 10; /* horiz inner gap between windows */ -static const unsigned int gappiv = 10; /* vert inner gap between windows */ -static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ -static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ -static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ -static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ -static const int showbar = 1; /* 0 means no standard bar */ -static const int topbar = 1; /* 0 means standard bar at bottom */ -static const int extrabar = 1; /* 0 means no extra bar */ -static const char statussep = ';'; /* separator between statuses */ -static const char *fonts[] = { "monospace:size=10" }; -static const char dmenufont[] = "monospace:size=10"; -static const char col_normbg[] = "#282A36"; -static const char col_normfg[] = "#FF79C6"; -static const char col_normbrd[] = "#282A36"; -static const char col_selbg[] = "#FF79C6"; -static const char col_selfg[] = "#282A36"; -static const char col_selbrd[] = "#FFB86C"; -static const char *colors[][3] = { +static const int showsystray = 1; /* 0 means no systray */ +static const unsigned int gappih = 10; /* horiz inner gap between windows */ +static const unsigned int gappiv = 10; /* vert inner gap between windows */ +static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ +static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ +static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ +static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ +static const int showbar = 1; /* 0 means no standard bar */ +static const int topbar = 1; /* 0 means standard bar at bottom */ +static const int extrabar = 1; /* 0 means no extra bar */ +static const char statussep = ';'; /* separator between statuses */ +static const char *fonts[] = { "monospace:size=10" }; +static const char dmenufont[] = "monospace:size=10"; +static const char col_normbg[] = "#091833"; +static const char col_normfg[] = "#0abdc6"; +static const char col_normbrd[] = "#091833"; +static const char col_selbg[] = "#321959"; +static const char col_selfg[] = "#ea00d9"; +static const char col_selbrd[] = "#ea00d9"; +static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_normfg, col_normbg, col_normbrd }, [SchemeSel] = { col_selfg, col_selbg, col_selbrd }, @@ -38,10 +38,12 @@ typedef struct { const char *name; const void *cmd; } Sp; + const char *spcmd1[] = {"st", "-n", "spterm", "-g", "120x34", NULL }; const char *spcmd2[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "ranger", NULL }; const char *spcmd3[] = {"st", "-n", "pmixer", "-g", "144x41", "-e", "pulsemixer", NULL }; const char *spcmd4[] = {"st", "-n", "spmpc", "-g", "144x41", "-e", "ncmpcpp", NULL }; + static Sp scratchpads[] = { /* name cmd */ {"spterm", spcmd1}, @@ -57,19 +59,19 @@ static const Rule rules[] = { * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ - /* class instance title tags mask isfloating isterminal noswallow monitor */ - { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, - { "st-256color", NULL, NULL, 0, 0, 1, 0, -1 }, - { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 }, - { NULL, "spfm", NULL, SPTAG(1), 1, 1, 0, -1 }, - { NULL, "pmixer", NULL, SPTAG(2), 1, 1, 0, -1 }, - { NULL, "spmpc", NULL, SPTAG(3), 1, 1, 0, -1 }, + /* class instance title tags mask isfloating isterminal noswallow monitor */ + { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, + { "st-256color", NULL, NULL, 0, 0, 1, 0, -1 }, + { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 }, + { NULL, "spfm", NULL, SPTAG(1), 1, 1, 0, -1 }, + { NULL, "pmixer", NULL, SPTAG(2), 1, 1, 0, -1 }, + { NULL, "spmpc", NULL, SPTAG(3), 1, 1, 0, -1 }, }; /* layout(s) */ -static const float mfact = 0.55; /* 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 float mfact = 0.55; /* 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 lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ static const Layout layouts[] = { @@ -93,94 +95,93 @@ 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_normbg, "-nf", col_normfg, "-sb", col_selbg, "-sf", col_selfg, NULL }; -static const char *termcmd[] = { "st", NULL }; -static const char *mute[] = { "pamixer", "-t", NULL }; -static const char *incvol[] = { "pamixer", "-i", "5", NULL }; -static const char *decvol[] = { "pamixer", "-d", "5", NULL }; -static const char *sysact[] = { "sysact", NULL }; -static const char *passcopy[] = { "dmenu-pass", "--no-username", NULL }; -static const char *passtype[] = { "dmenu-pass", "--type", NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_normbg, "-nf", col_normfg, "-sb", col_selbg, "-sf", col_selfg, NULL }; +static const char *termcmd[] = { "st", NULL }; +static const char *mute[] = { "pamixer", "-t", NULL }; +static const char *incvol[] = { "pamixer", "-i", "5", NULL }; +static const char *decvol[] = { "pamixer", "-d", "5", NULL }; +static const char *sysact[] = { "sysact", NULL }; + static const char *mpctoggle[] = { "mpc", "toggle", NULL }; -static const char *mpcnext[] = { "mpc", "next", NULL }; -static const char *mpcprev[] = { "mpc", "prev", NULL }; +static const char *mpcnext[] = { "mpc", "next", NULL }; +static const char *mpcprev[] = { "mpc", "prev", NULL }; static const Key keys[] = { - /* modifier key function argument */ - // general - { MODKEY, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_d, spawn, {.v = dmenucmd } }, - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY|ShiftMask, XK_b, toggleextrabar, {0} }, - { MODKEY, XK_o, incnmaster, {.i = +1 } }, - { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, - { MODKEY, XK_q, killclient, {0} }, - { MODKEY|ShiftMask, XK_q, quit, {0} }, - { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, - - // scripts & programsmarkus - { MODKEY, XK_BackSpace, spawn, {.v = sysact } }, - { MODKEY|ShiftMask, XK_BackSpace, spawn, {.v = passtype } }, - { MODKEY|ControlMask|ShiftMask, XK_BackSpace, spawn, {.v = passcopy } }, + /* modifier key function argument */ + // general + { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_d, spawn, {.v = dmenucmd } }, + { MODKEY, XK_b, togglebar, {0} }, + { MODKEY|ShiftMask, XK_b, toggleextrabar, {0} }, + { MODKEY, XK_o, incnmaster, {.i = +1 } }, + { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, + { MODKEY, XK_q, killclient, {0} }, + { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, + + // scripts & programs + { MODKEY, XK_BackSpace, spawn, {.v = sysact } }, // mpc && pulseaudio - { 0, XF86XK_AudioLowerVolume, spawn, {.v = decvol } }, - { 0, XF86XK_AudioRaiseVolume, spawn, {.v = incvol } }, - { 0, XF86XK_AudioMute, spawn, {.v = mute } }, - { 0, XF86XK_AudioPlay, spawn, {.v = mpctoggle } }, - { MODKEY, XK_minus, spawn, {.v = decvol } }, - { MODKEY, XK_equal, spawn, {.v = incvol } }, - { MODKEY|ShiftMask, XK_m, spawn, {.v = mute } }, - { MODKEY|ShiftMask, XK_p, spawn, {.v = mpctoggle } }, - { MODKEY|ShiftMask, XK_minus, spawn, {.v = mpcprev } }, - { MODKEY|ShiftMask, XK_equal, spawn, {.v = mpcnext } }, + { MODKEY, XK_minus, spawn, {.v = decvol } }, + { MODKEY, XK_equal, spawn, {.v = incvol } }, + { MODKEY|ShiftMask, XK_m, spawn, {.v = mute } }, + { MODKEY|ShiftMask, XK_p, spawn, {.v = mpctoggle } }, + { MODKEY|ShiftMask, XK_minus, spawn, {.v = mpcprev } }, + { MODKEY|ShiftMask, XK_equal, spawn, {.v = mpcnext } }, // layouts - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, // tile - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, // float - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, // monocle - { MODKEY, XK_w, setlayout, {.v = &layouts[3]} }, // tilewide + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, // tile + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, // float + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, // monocle + { MODKEY, XK_w, setlayout, {.v = &layouts[3]} }, // tilewide // vanity gaps - { MODKEY|ShiftMask, XK_g, defaultgaps, {0} }, - { MODKEY, XK_g, togglegaps, {0} }, - { MODKEY|ShiftMask, XK_j, incrgaps, {.i = -1 } }, - { MODKEY|ShiftMask, XK_k, incrgaps, {.i = +1 } }, + { MODKEY|ShiftMask, XK_g, defaultgaps, {0} }, + { MODKEY, XK_g, togglegaps, {0} }, + { MODKEY|ShiftMask, XK_j, incrgaps, {.i = -1 } }, + { MODKEY|ShiftMask, XK_k, incrgaps, {.i = +1 } }, // navigation - { MODKEY, XK_space, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY, XK_space, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY, XK_j, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, // multi-monitor - { MODKEY, XK_Left, focusmon, {.i = -1 } }, - { MODKEY, XK_Right, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } }, + { MODKEY, XK_Left, focusmon, {.i = -1 } }, + { MODKEY, XK_Right, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } }, // scratchpads - { MODKEY, XK_y, togglescratch, {.ui = 0 } }, - { MODKEY, XK_u, togglescratch, {.ui = 1 } }, - { MODKEY, XK_p, togglescratch, {.ui = 2 } }, - { MODKEY, XK_n, togglescratch, {.ui = 3 } }, + { MODKEY, XK_y, togglescratch, {.ui = 0 } }, + { MODKEY, XK_u, togglescratch, {.ui = 1 } }, + { MODKEY, XK_p, togglescratch, {.ui = 2 } }, + { MODKEY, XK_n, togglescratch, {.ui = 3 } }, // tags - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - 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) + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + 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) + + // Media keys + { 0, XF86XK_AudioLowerVolume, spawn, {.v = decvol } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = incvol } }, + { 0, XF86XK_AudioMute, spawn, {.v = mute } }, + { 0, XF86XK_AudioPlay, spawn, {.v = mpctoggle } }, }; /* button definitions */