Bug 226924 - x11-wm/dwm: Add support for raising/lowering volume via XF86Raise/LowerVolume keys
Summary: x11-wm/dwm: Add support for raising/lowering volume via XF86Raise/LowerVolume...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias Kortkamp
URL:
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2018-03-25 19:48 UTC by Ashish Gupta
Modified: 2018-05-15 05:07 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (schot)


Attachments
Add volume change from keyboard support to dwm config.h (1.54 KB, patch)
2018-03-25 19:48 UTC, Ashish Gupta
no flags Details | Diff
Patch for Makefile and new patch in files subdir (2.31 KB, patch)
2018-03-26 17:31 UTC, Ashish Gupta
no flags Details | Diff
Change Makefile and provide patch for volume control via keyboard (2.32 KB, patch)
2018-03-26 17:50 UTC, Ashish Gupta
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ashish Gupta 2018-03-25 19:48:23 UTC
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).
Comment 1 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-25 20:07:22 UTC
(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
Comment 2 Ashish Gupta 2018-03-25 21:09:40 UTC
(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!
Comment 3 Ashish Gupta 2018-03-26 17:31:21 UTC
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.
Comment 4 Ashish Gupta 2018-03-26 17:50:11 UTC
Created attachment 191846 [details]
Change Makefile and provide patch for volume control via keyboard

Fix whitespace in the previous patch to keep keysyms aligned.
Comment 5 Ashish Gupta 2018-04-22 06:55:49 UTC
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 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-04-22 08:08:30 UTC
Comment on attachment 191846 [details]
Change Makefile and provide patch for volume control via keyboard

Approved by: portmgr (maintainer timeout, > 2 weeks)
Comment 7 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-04-22 14:55:47 UTC
(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.
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-05-11 13:54:46 UTC
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
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2018-05-15 05:07:41 UTC
(In reply to Mateusz Piotrowski from comment #7)

Sure, anyone is free to propose a maintainer change (ideally, isolated from any other changes).