1
0

make work better

This commit is contained in:
dtb 2022-06-26 16:34:09 -04:00
parent 59936a7c21
commit 19282627fc

View File

@ -14,13 +14,16 @@ argv0="$0"
# `volume s` must output the current volume in integer form in whatever units # `volume s` must output the current volume in integer form in whatever units
# are being used by `volume a` on the given system. # are being used by `volume a` on the given system.
! command -v stris >/dev/null 2>/dev/null \
&& printf "%b: Missing stris.\n" "$argv0" \
&& exit 1 \
|| true
VOLUME_TMP_FILE="$HOME/.volume-previous" VOLUME_TMP_FILE="$HOME/.volume-previous"
system_determine(){
if [ "$(uname)" = NetBSD ]; then
printf "NetBSD\n"
elif command -v pactl >/dev/null 2>&1; then
printf "PulseAudio\n"
fi
}
unknown_system(){ unknown_system(){
printf "%s: Unknown system.\n" "$argv0" 1>&2 printf "%s: Unknown system.\n" "$argv0" 1>&2
exit 1 exit 1