summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachIR <zachir@librem.one>2021-02-01 01:13:01 -0600
committerZachIR <zachir@librem.one>2021-02-01 01:13:01 -0600
commit240ea435c5bd71a6dde66fed604d7ca4279747da (patch)
tree4b009be7cc27d00da364eafd661846bb5c367cd5
parentd44f18fa503376d450acb05113aed34f1478e89e (diff)
Add help flag
-rw-r--r--README.md1
-rwxr-xr-xvolsv4
-rw-r--r--volsv.14
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