alias for unmuting the current audio device

This commit is contained in:
MorganGeek 2020-07-23 07:28:17 +02:00
parent f9d012072d
commit b68120da30
2 changed files with 2 additions and 0 deletions

View File

@ -29,3 +29,4 @@ alias zoom="switch_headset && open -na 'zoom.us'"
alias nozoom="pkill 'zoom.us' && success 'zoom has been stopped'" alias nozoom="pkill 'zoom.us' && success 'zoom has been stopped'"
alias zoom30='zoomtimeboxed 30' alias zoom30='zoomtimeboxed 30'
alias zoom60='zoomtimeboxed 60' alias zoom60='zoomtimeboxed 60'
alias unmute='osascript -e "set volume without output muted"'

View File

@ -198,6 +198,7 @@ function switch_device() {
if SwitchAudioSource -a | grep "$target_device" 1>/dev/null; then if SwitchAudioSource -a | grep "$target_device" 1>/dev/null; then
if SwitchAudioSource -s "$1" 1>/dev/null; then if SwitchAudioSource -s "$1" 1>/dev/null; then
success "switched to $target_device" success "switched to $target_device"
unmute
else else
error "failed to switch to $target_device" error "failed to switch to $target_device"
fi fi