On Mon, Jun 20, 2011 at 12:07:48PM +0300, Le Tian wrote:
> On Mon, Jun 20, 2011 at 12:05 PM, Nick <suckless-...@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

Attachment: pgpNwSUweNX1g.pgp
Description: PGP signature

Reply via email to