From 0a773e03f44107201f5c14b4a830949abc0ee6a4 Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 31 Jan 2021 22:57:31 -0600 Subject: Add support to mute ALSA microphone --- README.md | 7 ++----- volsv | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e139145..49ae925 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ Volsv is a POSIX-compliant shell script I wrote in 2020, and have been modifying - Increasing volume - Decreasing volume - Toggling the interface mute -- Toggling the microphone mute\* +- Toggling the microphone mute - Getting the volume - Getting the mute state -in both pulseaudio and ALSA\*. Once I get OpenBSD and FreeBSD up and running, I will add those sound options too. +in both pulseaudio and ALSA. Once I get OpenBSD and FreeBSD up and running, I will add those sound options too. It depends on: @@ -32,6 +32,3 @@ I made volsv so that I could use it with keybindings to control the volume, rega - get volume level: `getv` or `-v` - get mute state: `getm` or `-g` - - -\*Volsv does not yet support muting the microphone in ALSA. diff --git a/volsv b/volsv index 489e372..2969963 100755 --- a/volsv +++ b/volsv @@ -25,6 +25,7 @@ alsasv () { "up" | "-i") amixer sset Master 5%+ ;; "down" | "-d") amixer sset Master 5%- ;; "toggle" | "-t") amixer sset Master toggle ;; + "mic" | "-m") amixer sset Capture toggle ;; "getv" | "-v") amixer sget Master | grep '\[[0-9]*\%\]' | cut -d' ' -f6 | sed 's/\[//;s/\]//g' ;; "getm" | "-g") amixer sget Master | grep '\[o[fn]' | cut -d' ' -f8 | head -1 ;; *) printerror "$1" ;; -- cgit v1.2.3