scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit c1072cf98d05d1ca3a6cd23d82d00ec3d9c5269f
parent 102855df01368a5e4ee2faa142dbd5579e1a618a
Author: dsp <dsp@2f30.org>
Date:   Wed, 24 Sep 2014 14:39:46 -0600

volume script now reports the current level when run with no arguments

Diffstat:
Mvolume | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/volume b/volume @@ -3,7 +3,11 @@ #OpenBSD volume control #normalizes the input percentage to 0-255 usageexit() { - echo "$(basename $0) [0-100]" + typeset -i currval + echo "usage:" "$(basename $0) [0-100]" + currval=$(mixerctl|grep outputs.master\=|awk -F"," '{print $NF}') + currval=$(echo $currval "/ 2.55"|bc) + echo "Current level:" $currval "%" exit }