desktop/dwm: Add option to use keypad to select tags.

This commit is contained in:
Dave Woodfall 2019-06-13 08:38:17 +01:00 committed by Willy Sudiarto Raharjo
parent 2f8dd5a50f
commit 940e4ca757
No known key found for this signature in database
GPG key ID: 887B8374D7333381
3 changed files with 27 additions and 1 deletions

View file

@ -31,6 +31,10 @@ Use rofi instead of dmenu:
ROFI=yes sh dwm.SlackBuild
Enable keypad for tags as well as top row digits:
KEYPAD=yes sh dwm.SlackBuild
The ROFI option also installs dwm.rasi rofi theme to
/usr/share/rofi/themes. This is set to use the same
font as dwm, so if you have patched the dwm font then you

View file

@ -37,7 +37,7 @@
PRGNAM=dwm
VERSION=${VERSION:-6.2}
BUILD=${BUILD:-4}
BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -89,6 +89,9 @@ MOD4=${MOD4:-no}
ROFI=${ROFI:-no}
[ "$ROFI" = "yes" ] && patch -p1 <$CWD/sbo-patches/replace-dmenu-rofi.patch
KEYPAD=${KEYPAD:-no}
[ "$KEYPAD" = "yes" ] && patch -p0 <$CWD/sbo-patches/enable-keypad.patch
mv config.def.h config.h
chown -R root:root .

View file

@ -0,0 +1,19 @@
--- config.def.h 2019-06-04 20:24:48.426235490 +0100
+++ config.h 2019-06-13 08:17:45.674540960 +0100
@@ -84,6 +84,16 @@
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
+ TAGKEYS( XK_KP_End, 0)
+ TAGKEYS( XK_KP_Down, 1)
+ TAGKEYS( XK_KP_Next, 2)
+ TAGKEYS( XK_KP_Left, 3)
+ TAGKEYS( XK_KP_Begin, 4)
+ TAGKEYS( XK_KP_Right, 5)
+ TAGKEYS( XK_KP_Home, 6)
+ TAGKEYS( XK_KP_Up, 7)
+ TAGKEYS( XK_KP_Prior, 8)
+ TAGKEYS( XK_KP_Insert, 9)
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)