summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2021-01-31 23:13:43 -0600
committerzachir <zachir@librem.one>2021-01-31 23:13:43 -0600
commitd44f18fa503376d450acb05113aed34f1478e89e (patch)
tree9c5e6485158dc00960c40b48d79df5b80a964b66
parent0a773e03f44107201f5c14b4a830949abc0ee6a4 (diff)
Add a man page, increase helpfulness of the -h flag
-rwxr-xr-xvolsv9
-rw-r--r--volsv.138
2 files changed, 46 insertions, 1 deletions
diff --git a/volsv b/volsv
index 2969963..f79662b 100755
--- a/volsv
+++ b/volsv
@@ -36,7 +36,14 @@ echo "$@" | grep -q ' *-h *' && echo \
"Volsv is Free software. You can use it for any purpose, but I make no guerantee about its usability or fitness "\
"for any particular purpose. You are also free to redistribute, modify, and distribute your modifications to "\
"volsv. Volsv is distributed under the BSD 3-Clause license to ensure full license compatibility with GNU, "\
-"Linux, and BSD operating systems. A copy of this license is included in the repository." && exit
+"Linux, and BSD operating systems. A copy of this license is included in the repository.\n\n"\
+"Volsv is a script designed to control the volume of a *NIX machine. The commands/flags are as follows:
+increase volume: 'up' or '-i'
+decrease volume: 'down' or '-d'
+toggle volume mute: 'toggle' or '-t'
+toggle mic mute: 'mic' or '-m'
+get volume level: 'getv' or '-v'
+get mute state: 'getm' or '-g'" && exit
for i in $@; do
pgrep -x pulseaudio >/dev/null && pulsesv $1 || alsasv $1
diff --git a/volsv.1 b/volsv.1
new file mode 100644
index 0000000..3ffcd4a
--- /dev/null
+++ b/volsv.1
@@ -0,0 +1,38 @@
+.TH VOLSV 1 volsv\-0.1.2
+.SH NAME
+volsv \- volume set variable
+.SH SYNOPSIS
+.B volsv
+.RB [ \-i ]
+.RB [ \-d ]
+.RB [ \-t ]
+.RB [ \-m ]
+.RB [ \-v ]
+.RB [ \-g ]
+.SH DESCRIPTION
+.B volsv
+Volsv is a free software, POSIX shell compliant script ZachIR wrote in 2020, and
+has been modifying since, for simple volume control. Volsv controls volume for
+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 \-i
+volsv increases the volume by 5%
+.TP
+.B \-d
+volsv decreases the volume by 5%
+.TP
+.B \-t
+volsv will toggle the volume mute
+.TP
+.BI \-m
+volsv will toggle the microphone mute
+.TP
+.BI \-v
+volsv will print the volume level
+.TP
+.BI \-g
+volsv will print the mute status
+.SH SEE ALSO
+.IR amixer (1),