From: Nick Bowler Date: Fri, 11 Aug 2023 00:56:40 +0000 (-0400) Subject: Use mpdexec for key bindings. X-Git-Url: https://git.draconx.ca/gitweb/fvwmconf.git/commitdiff_plain/HEAD Use mpdexec for key bindings. We have a perfectly good script to implement these key bindings that does not depend on external programs. --- diff --git a/common/bindings b/common/bindings index ff0d4e7..ccfaa78 100644 --- a/common/bindings +++ b/common/bindings @@ -1,14 +1,3 @@ -# MPD shortcuts -Key Page_Up A CM Exec exec mpc prev -Key Page_Down A CM Exec exec mpc next -Key End A CM Exec exec mpc stop -Key Home A CM Exec exec mpc pause -Key Insert A CM Exec exec mpc play -Key Page_Down A CM Exec exec mpc next - -Mouse 4 A CM Exec exec mpc prev -Mouse 5 A CM Exec exec mpc next - # Window management Key F4 A M Close diff --git a/config b/config index c96d3f4..de9ce43 100644 --- a/config +++ b/config @@ -20,6 +20,7 @@ SetEnv GTK2_RC_FILES $[FVWM_USERDIR]/gtk2rc Read global/multiscreen Read global/fullscreen Read global/appspecific +Read global/mpdkeys # Machine-specific features PipeRead "[ -f '$[FVWM_USERDIR]/$[HOST]/config' ] \ diff --git a/global/mpdkeys b/global/mpdkeys new file mode 100644 index 0000000..897706b --- /dev/null +++ b/global/mpdkeys @@ -0,0 +1,19 @@ +# Copyright © 2023 Nick Bowler +# +# Misc MPD key bindings. +# +# License WTFPL2: Do What The Fuck You Want To Public License, version 2. +# This is free software: you are free to do what the fuck you want to. +# There is NO WARRANTY, to the extent permitted by law. + +Key Page_Up A CM Exec exec $[infostore.mpdexec_cmd] previous +Key Page_Down A CM Exec exec $[infostore.mpdexec_cmd] next +Key End A CM Exec exec $[infostore.mpdexec_cmd] stop +Key Home A CM Exec exec $[infostore.mpdexec_cmd] pause 1 +Key Insert A CM Exec exec $[infostore.mpdexec_cmd] play + +Mouse 4 A CM Exec exec $[infostore.mpdexec_cmd] previous +Mouse 5 A CM Exec exec $[infostore.mpdexec_cmd] next + +Test (!EnvMatch infostore.mpdexec_cmd *?) \ + InfoStoreAdd mpdexec_cmd "$[FVWM_USERDIR]/gitmodules/mpdhacks/mpdexec.pl"