X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=config.def.h;h=075c8d5d14cde8b2627f831125da6efbea40f09d;hp=1b2349cf12713d191c492cc95998ea5ece5ade44;hb=ae1d865ac0cfdace4f5c6e97d8cc3cb88dfbc788;hpb=512541bfbd499b1c10a05aaa795967ebb5fb9493 diff --git a/config.def.h b/config.def.h index 1b2349c..075c8d5 100644 --- a/config.def.h +++ b/config.def.h @@ -1,27 +1,27 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*" -#define NORMBORDERCOLOR "#cccccc" -#define NORMBGCOLOR "#cccccc" -#define NORMFGCOLOR "#000000" -#define SELBORDERCOLOR "#0066ff" -#define SELBGCOLOR "#0066ff" -#define SELFGCOLOR "#ffffff" -static uint borderpx = 1; /* border pixel of windows */ -static uint snap = 32; /* snap pixel */ -static Bool showbar = True; /* False means no bar */ -static Bool topbar = True; /* False means bottom bar */ +static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; +static const char normbordercolor[] = "#cccccc"; +static const char normbgcolor[] = "#cccccc"; +static const char normfgcolor[] = "#000000"; +static const char selbordercolor[] = "#0066ff"; +static const char selbgcolor[] = "#0066ff"; +static const char selfgcolor[] = "#ffffff"; +static uint borderpx = 1; /* border pixel of windows */ +static uint snap = 32; /* snap pixel */ +static Bool showbar = True; /* False means no bar */ +static Bool topbar = True; /* False means bottom bar */ #ifdef XINERAMA -static uint xidx = 0; /* Xinerama screen index to use */ +static uint xidx = 0; /* Xinerama screen index to use */ #endif /* tagging */ static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static Rule rules[] = { - /* class instance title tags ref isfloating */ + /* class instance title tags mask isfloating */ { "Gimp", NULL, NULL, 0, True }, { "Firefox", NULL, NULL, 1 << 8, True }, }; @@ -45,12 +45,16 @@ static Layout layouts[] = { { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (char*[]){ "/bin/sh", "-c", cmd, NULL } } +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } + +/* commands */ +static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; +static const char *termcmd[] = { "uxterm", NULL }; static Key keys[] = { /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = (char *[]){"dmenu_run", "-fn", FONT, "-nb", NORMBGCOLOR, "-nf", NORMFGCOLOR, "-sb", SELBGCOLOR, "-sf", SELFGCOLOR, NULL}} }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = (char *[]){"uxterm", NULL}} }, + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, @@ -89,15 +93,11 @@ static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, togglelayout, {0} }, { ClkLtSymbol, 0, Button3, togglemax, {0} }, - { ClkWinTitle, 0, Button1, movemouse, {0} }, { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkWinTitle, 0, Button3, resizemouse, {0} }, - { ClkWinTitle, 0, Button4, focusstack, {.i = +1 } }, - { ClkWinTitle, 0, Button5, focusstack, {.i = -1 } }, + { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - { ClkRootWin, Button1Mask, Button3, spawn, {.v = (char *[]){"uxterm", NULL}} }, TAGBUTTONS(0) TAGBUTTONS(1) TAGBUTTONS(2)