diff options
author | zachir <zachir@librem.one> | 2021-01-31 22:57:31 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2021-01-31 22:57:31 -0600 |
commit | 0a773e03f44107201f5c14b4a830949abc0ee6a4 (patch) | |
tree | e42c8b6f9fcbd178798ac272451dc5809a450bf4 | |
parent | b2d4a269084c955ba27876b93cfc2cf915b0d8b7 (diff) |
Add support to mute ALSA microphone
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | volsv | 1 |
2 files changed, 3 insertions, 5 deletions
@@ -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. @@ -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" ;; |