My configuration of sxmo fork of suckless dwm.

git clone git://watertao.xyz/programs/sxmo-dwm.git

commit d0dbdeda3a11201faede1c71418759931fbaaeee
parent 95f1fd201b3ef7b39deedfffdc1a643f9199b2df
Author: Willow Barraco <contact@willowbarraco.fr>
Date:   Thu, 16 Feb 2023 11:34:37 +0100

Use bonsai (or multikey script fallback)

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>

Diffstat:
Mconfig.def.h | 19+++++++++++++++----
Mconfig.mk | 5++++-
2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -80,10 +80,21 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, #include <X11/XF86keysym.h> static Key keys[] = { - /* PP */ - { KeyPress, 0, XF86XK_AudioRaiseVolume, spawn, { .v = (const char*[]){ "sxmo_hook_inputhandler.sh", "volup_one", NULL } } }, - { KeyPress, 0, XF86XK_AudioLowerVolume, spawn, { .v = (const char*[]){ "sxmo_hook_inputhandler.sh", "voldown_one", NULL } } }, - { KeyPress, 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "sxmo_hook_inputhandler.sh", "powerbutton_one", NULL } } }, + /* PP */ +#ifdef NOBONSAI + { KeyPress, 0, XF86XK_AudioRaiseVolume, spawn, { .v = (const char*[]){ "sxmo_multikey.sh", "volup", "volup_one", "volup_two", "volup_three", NULL } } }, + { KeyPress, 0, XF86XK_AudioLowerVolume, spawn, { .v = (const char*[]){ "sxmo_multikey.sh", "voldown", "voldown_one", "voldown_two", "voldown_three", NULL } } }, + { KeyPress, 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "sxmo_multikey.sh", "powerbutton", "powerbutton_one", "powerbutton_two", "powerbutton_three", NULL } } }, +#else + { KeyPress, 0, XF86XK_AudioRaiseVolume, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "volup_pressed", NULL } } }, + { KeyRelease, 0, XF86XK_AudioRaiseVolume, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "volup_released", NULL } } }, + + { KeyPress, 0, XF86XK_AudioLowerVolume, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "voldown_pressed", NULL } } }, + { KeyRelease, 0, XF86XK_AudioLowerVolume, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "voldown_released", NULL } } }, + + { KeyPress, 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "power_pressed", NULL } } }, + { KeyRelease, 0, XF86XK_PowerOff, spawn, { .v = (const char*[]){ "bonsaictl", "-e", "power_released", NULL } } }, +#endif /* Used by scripts via xdotool */ { KeyPress, MODKEY|ShiftMask, XK_e, shiftview, {.i = -1} }, diff --git a/config.mk b/config.mk @@ -20,12 +20,15 @@ FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) #FREETYPEINC = ${X11INC}/freetype2 +# Disable bonsai by uncommenting this +#NOBONSAIFLAGS = -DNOBONSAI + # includes and libs INCS = -I${X11INC} -I${FREETYPEINC} `pkg-config --cflags xft pango pangoxft` LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lX11-xcb -lxcb -lxcb-res -lrt `pkg-config --libs xft pango pangoxft` # flags -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} ${NOBONSAIFLAGS} #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS}