During podcasting or conference calls you might want to quickly toggle input volume on and off.
This project provides very simple Bash script that uses osascript
to get and set system input volume level.
Very important aspect of this implementation is that when it turns input volume back on it restores volume level to previously saved value.
- Download script or clone the repo.
- Add executable permissions:
chmod +x ~/Downloads/toggle-sound-input
(not required if you clone repo). - Toggle your input sound on or off just by calling it
~/Downloads/toggle-sound-input
!
Ouput example:
$ ~/Downloads/toggle-sound-input
- Sound input muted.
$ ~/Downloads/toggle-sound-input
+ Sound input level restored to 75.
You can make an alias for the script or add it to PATH
.
You can assign a hotkey to run the script.
Thanks to Artur Dryomov for tweeting a snippet of osascript
that was muting the sound, it made me try to script an implementation that'd do it pragmatically.