Created attachment 191812 [details] Add volume change from keyboard support to dwm config.h Add support to dwm via config.h for changing the volume using the mixer utility by using the volume keys on the keyboard. This uses the XF86AudioLowerVolume and XF86AudioRaiseVolume keysyms which should work across keyboards irrespective of where the RaiseVolume/LowerVolume keys are located (F2/F3 in my case, but I've seen F10/F11 and others).
(In reply to Ashish Gupta from comment #0) Thank you for your submission! I think there is a typo: the patch you've sent changes the mod key apart from the volume bindings. Also, I think it should be an option.[1] Whether it should be on by default is up to the maintainer, however. [1]: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-options
(In reply to Mateusz Piotrowski from comment #1) Thank you for the feedback! The modifier line in the patch is from the existing patch in files/ in freebsd-ports. This patch was supposed to replace that file in files/ . I will look into providing an option in the makefile!
Created attachment 191844 [details] Patch for Makefile and new patch in files subdir With the add-volume-support-proper-dwm.patch file, make showconfig / make config now let user select whether they want to enable volume controls or not. This also adds a new file in files/ which is intended *only* to provide volume support without dependencies on existing patches in the tree. I've tested it and can confirm that it can be toggled with make config to on or off.
Created attachment 191846 [details] Change Makefile and provide patch for volume control via keyboard Fix whitespace in the previous patch to keep keysyms aligned.
I've been running with this patch for about a month now, and it seems to do what it was intended to do. I think this is good to be merged, unless someone has other objections.
Comment on attachment 191846 [details] Change Makefile and provide patch for volume control via keyboard Approved by: portmgr (maintainer timeout, > 2 weeks)
(In reply to Kubilay Kocak from comment #6) BTW, do you think that I could take over the maintenance of this port? I've opened an issue for that #226929. It would allow us not to wait on the timeout.
A commit references this bug: Author: tobik Date: Fri May 11 13:54:39 UTC 2018 New revision: 469641 URL: https://svnweb.freebsd.org/changeset/ports/469641 Log: 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 Changes: head/x11-wm/dwm/Makefile head/x11-wm/dwm/files/extra-patch-config.def.h head/x11-wm/dwm/files/superasmodkey-patch-config.def.h head/x11-wm/dwm/files/volumecontrol-patch-config.def.h
(In reply to Mateusz Piotrowski from comment #7) Sure, anyone is free to propose a maintainer change (ideally, isolated from any other changes).