mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
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:
parent
b93a5de558
commit
90f9b2d982
@ -1,4 +1,4 @@
|
||||
This dwm 6.3 (44adafe, 2022-08-11) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0).
|
||||
This dwm 6.3 (84d7322, 2022-08-18) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0).
|
||||
|
||||
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/dwm-flexipatch/blob/master/patches.def.h):
|
||||
```c
|
||||
|
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} ),
|
||||
|
Loading…
Reference in New Issue
Block a user