[dwm] xicon : more fixups and so

From: pancake <pancake_AT_youterm.com>
Date: Sun, 1 Jul 2007 07:50:55 +0200

I can't wait to implement some of the missing things. Now there's a target
in the Makefile that runs a progressbar icon to control the volume using the
mouse wheel. Left click starts a terminal with an aumix and right button
closes the program.

This is the code:

$ cat volume.sh
  foo=0;
  while : ; do
    cat ~/.xicon/pb/$$(($$foo*25))|icon|xicon -b '#333' -f '#aac' >/dev/null;
    ret=$$?;
    [ $$ret = 3 ] && foo=$$(($$foo+1));
    [ $$ret = 4 ] && foo=$$(($$foo-1));
    [ $$foo -gt 4 ] && foo=4;
    [ $$foo -lt 0 ] && foo=0;
    aumix -v $$(($$foo*25));
    [ $$ret = 0 ] && xterm -bg black -fn 10x20 -fg gray -e aumix ;
    [ $$ret = 2 ] && exit;
  done

The mandatory screenshot:

  http://news.nopcode.org/volume.png

Have fun!

  --pancake
Received on Sun Jul 01 2007 - 07:51:03 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:45:35 UTC