Bump to 84d7322.
config.def.h: make keys and buttons const Pretty much all other variables are declared as const when they're not modified. Ref. https://git.suckless.org/dwm/commit/84d7322113c2bf023f5eaa8537fb0e72d4105046.html
This commit is contained in:
14
config.def.h
14
config.def.h
@@ -879,13 +879,13 @@ static const char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL };
|
||||
|
||||
#if ON_EMPTY_KEYS_PATCH
|
||||
static const char* firefoxcmd[] = {"firefox", NULL};
|
||||
static Key on_empty_keys[] = {
|
||||
static const Key on_empty_keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ 0, XK_f, spawn, {.v = firefoxcmd } },
|
||||
};
|
||||
#endif // ON_EMPTY_KEYS_PATCH
|
||||
|
||||
static Key keys[] = {
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
#if KEYMODES_PATCH
|
||||
{ MODKEY, XK_Escape, setkeymode, {.ui = COMMANDMODE} },
|
||||
@@ -1281,14 +1281,14 @@ static Key keys[] = {
|
||||
};
|
||||
|
||||
#if KEYMODES_PATCH
|
||||
static Key cmdkeys[] = {
|
||||
static const Key cmdkeys[] = {
|
||||
/* modifier keys function argument */
|
||||
{ 0, XK_Escape, clearcmd, {0} },
|
||||
{ ControlMask, XK_c, clearcmd, {0} },
|
||||
{ 0, XK_i, setkeymode, {.ui = INSERTMODE} },
|
||||
};
|
||||
|
||||
static Command commands[] = {
|
||||
static const Command commands[] = {
|
||||
/* modifier (4 keys) keysyms (4 keys) function argument */
|
||||
{ {ControlMask, ShiftMask, 0, 0}, {XK_w, XK_h, 0, 0}, setlayout, {.v = &layouts[0]} },
|
||||
{ {ControlMask, 0, 0, 0}, {XK_w, XK_o, 0, 0}, setlayout, {.v = &layouts[2]} },
|
||||
@@ -1312,7 +1312,7 @@ static Command commands[] = {
|
||||
#else
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
#endif //
|
||||
static Button buttons[] = {
|
||||
static const Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
#if BAR_STATUSBUTTON_PATCH
|
||||
{ ClkButton, 0, Button1, spawn, {.v = dmenucmd } },
|
||||
@@ -1381,7 +1381,7 @@ static Button buttons[] = {
|
||||
/* signal definitions */
|
||||
/* signum must be greater than 0 */
|
||||
/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
|
||||
static Signal signals[] = {
|
||||
static const Signal signals[] = {
|
||||
/* signum function */
|
||||
{ "focusstack", focusstack },
|
||||
{ "setmfact", setmfact },
|
||||
@@ -1572,7 +1572,7 @@ static Signal signals[] = {
|
||||
|
||||
#if IPC_PATCH
|
||||
static const char *ipcsockpath = "/tmp/dwm.sock";
|
||||
static IPCCommand ipccommands[] = {
|
||||
static const IPCCommand ipccommands[] = {
|
||||
IPCCOMMAND( focusmon, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( focusstack, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incnmaster, 1, {ARG_TYPE_SINT} ),
|
||||
|
Reference in New Issue
Block a user