02-20-2025, 10:39 PM
Much easier to get a USB volume control like the one I've used for years. It has a nice heavy base and you can simply assign the push function of the knob to the "mpc toggle" command which toggles between play and pause.
https://www.amazon.com/dp/B01MV411BR?ref...tle_1&th=1
# Default /etc/triggerhappy/triggers.d/media.conf
# Modified
https://www.amazon.com/dp/B01MV411BR?ref...tle_1&th=1
# Default /etc/triggerhappy/triggers.d/media.conf
Code:
KEY_VOLUMEUP 1 /var/www/util/vol.sh -up 1
KEY_VOLUMEDOWN 1 /var/www/util/vol.sh -dn 1
KEY_MUTE 1 /var/www/util/vol.sh -mute
# Modified
Code:
KEY_VOLUMEUP 1 /var/www/util/vol.sh -up 1
KEY_VOLUMEDOWN 1 /var/www/util/vol.sh -dn 1
KEY_MUTE 1 /usr/bin/mpc toggle