scripts

various script and utils
git clone git://z3bra.org/scripts
Log | Files | Refs

commit 2dbc6468f8a33f50e543c994f74a2e16d81deab8
parent 9f34ec58fe61f717d8c851f44f865268df0760c6
Author: z3bra <willy@mailoo.org>
Date:   Thu Feb  5 14:09:19 +0100

volume: don't append '%' after volume

Diffstat:
volume | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/volume b/volume @@ -9,8 +9,8 @@ usage () { usage: $(basename $0) [-hsla] [-+!] -h : print help -s : print on/off - -l : print the current volume percentage - -a : print both level and state (default) + -l : print the current volume percentage (default) + -a : print both level and state + : volume +5% - : volume -5% ! : toggle mute @@ -18,7 +18,7 @@ EOF } level() { - amixer get $CHANNEL | sed -n 's/^.*\[\([0-9]\+%\).*$/\1/p' | uniq + amixer get $CHANNEL | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq } state() { @@ -26,7 +26,7 @@ state() { } # print out level and state if no argument is given -test $# -eq 0 && echo "`level` `state`" && exit 0 +test $# -eq 0 && echo "`level`" && exit 0 case $1 in -h) usage ;;