Re: [dev] volume level in dwm taskbar

From: Erik Falor <ewfalor_AT_gmail.com>
Date: Mon, 20 Jun 2011 12:00:46 -0600

On Mon, Jun 20, 2011 at 12:07:48PM +0300, Le Tian wrote:
> On Mon, Jun 20, 2011 at 12:05 PM, Nick <suckless-dev_AT_njw.me.uk> wrote:
>
> > On Mon, Jun 20, 2011 at 12:00:38PM +0300, Le Tian wrote:
> > > As long as "aumix -q" refuses to work after the latest update, what you
> > guys
> > > use to probe volume level? "amixer" could be an alternative but it
> > outputs
> > > crap, that is difficult to awk.
> >
> > It isn't great, but I use 'amixer sget PCM' and awk from
> > that. Or I use a little C utility I wrote which links to the
> > (rather ugly) alsa library functions.
> >
> > Nick
> >
> > you mean "amixer sget Master", yes, that is way better, thanks!
> --
> Tian

I've implemented something along the lines of what Nick has described,
but for wmii: you can take a look at my github to see how I did it:

https://github.com/fadein/wmii_statusbar

Of interest for you will be the file alsavolume.c

I much prefer this way over running a pipeline with awk et. al. every
couple of seconds if only to avoid PID bloat!

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

Received on Mon Jun 20 2011 - 20:00:46 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 20 2011 - 20:12:02 CEST