config.def.h: make keys and buttons const 84d73221
pretty much all other variables are declared as const when they're not
modified.
NRK · 2022-08-18 22:13 1 file(s) · +2 −2
config.def.h +2 −2
60 60
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
61 61
static const char *termcmd[]  = { "st", NULL };
62 62
63 -
static Key keys[] = {
63 +
static const Key keys[] = {
64 64
	/* modifier                     key        function        argument */
65 65
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
66 66
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
99 99
100 100
/* button definitions */
101 101
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
102 -
static Button buttons[] = {
102 +
static const Button buttons[] = {
103 103
	/* click                event mask      button          function        argument */
104 104
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
105 105
	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },