From 240ea435c5bd71a6dde66fed604d7ca4279747da Mon Sep 17 00:00:00 2001 From: ZachIR Date: Mon, 1 Feb 2021 01:13:01 -0600 Subject: Add help flag --- README.md | 1 + volsv | 4 ---- volsv.1 | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 49ae925..06d680f 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,5 @@ I made volsv so that I could use it with keybindings to control the volume, rega - toggle microphone mute\*: `mic` or `-m` - get volume level: `getv` or `-v` - get mute state: `getm` or `-g` +- help message: `-h` diff --git a/volsv b/volsv index f79662b..5103c7e 100755 --- a/volsv +++ b/volsv @@ -1,8 +1,4 @@ #!/bin/sh -# calculate average of two integers (for ALSA) -average () { - echo "$(( $(( $1 + $2 )) / 2 ))$" -} # print error message printerror () { echo "$1 is not a recognized command or flag" diff --git a/volsv.1 b/volsv.1 index 3ffcd4a..51c9803 100644 --- a/volsv.1 +++ b/volsv.1 @@ -9,6 +9,7 @@ volsv \- volume set variable .RB [ \-m ] .RB [ \-v ] .RB [ \-g ] +.RB [ \-h ] .SH DESCRIPTION .B volsv Volsv is a free software, POSIX shell compliant script ZachIR wrote in 2020, and @@ -17,6 +18,9 @@ pulseaudio if it is running, and ALSA if it is not. More sound servers are intended to be added in future versions. .SH OPTIONS .TP +.B \-h +volsv displays help message +.TP .B \-i volsv increases the volume by 5% .TP -- cgit v1.2.3