From b68120da30981b08abd2ef7b4eef9d28f290b8bc Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Thu, 23 Jul 2020 07:28:17 +0200 Subject: [PATCH] alias for unmuting the current audio device --- dot_aliases/macos.sh | 1 + dot_zsh_functions | 1 + 2 files changed, 2 insertions(+) diff --git a/dot_aliases/macos.sh b/dot_aliases/macos.sh index 99af846..db9671e 100755 --- a/dot_aliases/macos.sh +++ b/dot_aliases/macos.sh @@ -29,3 +29,4 @@ alias zoom="switch_headset && open -na 'zoom.us'" alias nozoom="pkill 'zoom.us' && success 'zoom has been stopped'" alias zoom30='zoomtimeboxed 30' alias zoom60='zoomtimeboxed 60' +alias unmute='osascript -e "set volume without output muted"' diff --git a/dot_zsh_functions b/dot_zsh_functions index 020ccc1..65354c6 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -198,6 +198,7 @@ function switch_device() { if SwitchAudioSource -a | grep "$target_device" 1>/dev/null; then if SwitchAudioSource -s "$1" 1>/dev/null; then success "switched to $target_device" + unmute else error "failed to switch to $target_device" fi