aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-05-11 21:54:39 +0800
committertobik <tobik@FreeBSD.org>2018-05-11 21:54:39 +0800
commit6c00cb64a15b3c7ab798489344ff6f1c5e8f5890 (patch)
tree8fa0028f180cef274a0b3cc08da5d157c8c817a3 /x11-wm
parent0e9773ee18a0dbf7385dc311c476ca8372fa6669 (diff)
downloadfreebsd-ports-gnome-6c00cb64a15b3c7ab798489344ff6f1c5e8f5890.tar.gz
freebsd-ports-gnome-6c00cb64a15b3c7ab798489344ff6f1c5e8f5890.tar.zst
freebsd-ports-gnome-6c00cb64a15b3c7ab798489344ff6f1c5e8f5890.zip
x11-wm/dwm: Add option to enable volume control keys [0]
- Assign to 0mp [1]. The current maintainer hasn't responded to PRs since 2012. - While here rename SUPERASMODKEY patch for consistency with the new volume keys patch - Fix variable order PR: 226924 [0], 226929 [1] Submitted by: Ashish Gupta <ashmew2@gmail.com> [0], 0mp [1] Approved by: maintainer timeouts
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/dwm/Makefile29
-rw-r--r--x11-wm/dwm/files/superasmodkey-patch-config.def.h (renamed from x11-wm/dwm/files/extra-patch-config.def.h)0
-rw-r--r--x11-wm/dwm/files/volumecontrol-patch-config.def.h23
3 files changed, 40 insertions, 12 deletions
diff --git a/x11-wm/dwm/Makefile b/x11-wm/dwm/Makefile
index dbc7a853f7a6..b723e7ae4a3f 100644
--- a/x11-wm/dwm/Makefile
+++ b/x11-wm/dwm/Makefile
@@ -10,7 +10,7 @@ MASTER_SITES= http://dl.suckless.org/${PORTNAME}/ \
PATCH_SITES= http://dwm.suckless.org/patches/
-MAINTAINER= schot@a-eskwadraat.nl
+MAINTAINER= 0mp@FreeBSD.org
COMMENT= Dynamic, small, fast and simple window manager
LICENSE= MIT
@@ -18,17 +18,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig
-OPTIONS_DEFINE= XINERAMA DOCS SUPERASMODKEY
-OPTIONS_DEFAULT=XINERAMA
-
-SUPERASMODKEY_DESC= Use Super instead of Alt for the dwm mod key
-
-XINERAMA_USE= XORG=xinerama
-XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS=
-
-SUPERASMODKEY_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-config.def.h
-
USE_XORG= x11 xft
+
MAKE_ARGS= CC="${CC}" PREFIX="${PREFIX}" MANPREFIX="${MANPREFIX}/man" \
X11INC="${LOCALBASE}/include" X11LIB="${LOCALBASE}/lib"
@@ -36,6 +27,18 @@ PLIST_FILES= bin/dwm \
man/man1/dwm.1.gz
PORTDOCS= README
+OPTIONS_DEFINE= XINERAMA DOCS SUPERASMODKEY VOLUMECONTROL
+OPTIONS_DEFAULT=XINERAMA
+
+SUPERASMODKEY_DESC= Use Super instead of Alt for the dwm mod key
+VOLUMECONTROL_DESC= Use keys on keyboard to raise or lower volume
+
+SUPERASMODKEY_EXTRA_PATCHES= ${PATCHDIR}/superasmodkey-patch-config.def.h
+VOLUMECONTROL_EXTRA_PATCHES= ${PATCHDIR}/volumecontrol-patch-config.def.h
+
+XINERAMA_USE= XORG=xinerama
+XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS=
+
pre-everything::
@${ECHO_MSG} "You can build dwm with your own config.h using the DWM_CONF knob:"
@${ECHO_MSG} "make DWM_CONF=/path/to/dwm/config.h install clean"
@@ -48,8 +51,10 @@ post-extract:
fi
post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwm
+
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwm
.include <bsd.port.mk>
diff --git a/x11-wm/dwm/files/extra-patch-config.def.h b/x11-wm/dwm/files/superasmodkey-patch-config.def.h
index ba8f3040261e..ba8f3040261e 100644
--- a/x11-wm/dwm/files/extra-patch-config.def.h
+++ b/x11-wm/dwm/files/superasmodkey-patch-config.def.h
diff --git a/x11-wm/dwm/files/volumecontrol-patch-config.def.h b/x11-wm/dwm/files/volumecontrol-patch-config.def.h
new file mode 100644
index 000000000000..2a14410402bb
--- /dev/null
+++ b/x11-wm/dwm/files/volumecontrol-patch-config.def.h
@@ -0,0 +1,23 @@
+--- config.def.h.orig 2015-11-08 23:39:37.000000000 +0100
++++ config.def.h 2018-03-25 21:26:37.860145000 +0200
+@@ -56,7 +56,11 @@
+ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
+ static const char *termcmd[] = { "st", NULL };
++static const char *incrvol[] = { "mixer", "vol", "+1:+1", NULL};
++static const char *decrvol[] = { "mixer", "vol", "-1:-1", NULL};
+
++#define XK_XF86AudioLowerVolume 0x1008ff11
++#define XK_XF86AudioRaiseVolume 0x1008ff13
+ static Key keys[] = {
+ /* modifier key function argument */
+ { MODKEY, XK_p, spawn, {.v = dmenucmd } },
+@@ -92,6 +96,8 @@
+ TAGKEYS( XK_8, 7)
+ TAGKEYS( XK_9, 8)
+ { MODKEY|ShiftMask, XK_q, quit, {0} },
++ { 0x0, XK_XF86AudioRaiseVolume, spawn, {.v = incrvol } },
++ { 0x0, XK_XF86AudioLowerVolume, spawn, {.v = decrvol } },
+ };
+
+ /* button definitions */