[clfswm-devel] [pull-request] Add volume mode

Philippe Brochard pbrochard at common-lisp.net
Tue Feb 22 14:12:58 UTC 2011


Hi,

Thanks a lot for the volume-mode. I really like it and use it now!
I've put it in the contrib directory since I think there is no need to
have it in the main code (like the mpd or xmms interface).
I've also added the ability to launch an external mixer from the volume
mode.

Thanks again,

Regards,

Philippe

Desmond O. Chang writes:

> Hi,
>
> The following changes since commit 014f413770096568320199de7d13ac10d2f34ec1:
>
>   src/clfswm.lisp (main-unprotected): Add a close hook. And close the
> notify window, the virtual keyboard and the clfswm terminal by
> default. (2011-02-16 11:47:09 +0100)
>
> are available in the git repository at:
>   git://repo.or.cz/clfswm/dochang.git volume-mode
>
> Desmond O. Chang (2):
>       Use ASDF:SYSTEM-SOURCE-DIRECTORY instead of *LOAD-TRUENAME*.
>       Add volume mode.
>
>  clfswm.asd                    |    6 +-
>  contrib/amixer.lisp           |   43 +++++++++++
>  contrib/server/server.lisp    |    2 +-
>  src/bindings-second-mode.lisp |    7 ++
>  src/bindings.lisp             |    4 +
>  src/clfswm-keys.lisp          |    2 +
>  src/clfswm-util.lisp          |    2 +-
>  src/clfswm-volume-mode.lisp   |  154 +++++++++++++++++++++++++++++++++++++++++
>  src/clfswm.lisp               |    6 +-
>  src/config.lisp               |   17 +++++
>  src/package.lisp              |    3 +
>  src/tools.lisp                |    7 ++
>  12 files changed, 246 insertions(+), 7 deletions(-)
>  create mode 100644 contrib/amixer.lisp
>  create mode 100644 src/clfswm-volume-mode.lisp
>
>
> This pull-request adds volume mode.
>
> This mode is inspired by the emms volume package.  When you change the
> volume in main mode or second mode, clfswm will enter volume mode and
> set a timer to leave this mode.  Changing volume in volume mode will
> reset the timer.  You can also leave volume mode manually by return,
> escape or control-g.
>
> Special variable *VOLUME-MODE-TIMEOUT* controls the timeout in
> seconds.  If it's positive, volume mode will exit when timeout occurs;
> if it's 0, volume mode will exit right now; if it's negative, volume
> will not exit even if timeout occurs.  Default timeout is 3 seconds.
>
> Volume mode uses three special variables to control the mixer:
> *VOLUME-MUTE-FUNCTION*, *VOLUME-LOWER-FUNCTION* and
> *VOLUME-RAISE-FUNCTION*.  Their values are functions which must accept
> no arguments and return two values indicating the mixer state.  The
> first value is the volume ratio whose type must be (real 0 1).  If the
> mixer is mute, the second value should be true, otherwise it should be
> false.  If volume controller cannot get the mixer state, it must
> return NIL.
>
> Volume mode shows a mute sign, a percentage and a ratio bar on the
> screen.  A plus sign '+' means it's unmute and a minus sign '-' means
> it's mute now.  If volume mode doesn't know the mixer state, a message
> "unknown" will be shown.
>
> contrib/amixer.lisp shows how to use volume mode with alsa.
>
>
> Thanks,
> Des
>
> _______________________________________________
> clfswm-devel mailing list
> clfswm-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/clfswm-devel




More information about the clfswm-devel mailing list