Skip to content

Instantly share code, notes, and snippets.

@Vftdan
Vftdan / toggleMicOneLiner.sh
Last active Jan 7, 2019 — forked from nikhilw/toggleMicOneLiner.sh
Toggle mic on-off on a Ubuntu / Linux Mint machine with a keyboard shortcut
View toggleMicOneLiner.sh
#! /bin/sh
# static icon, easier to set as a bash alias or directly use as a single command instead of creating a script file.
amixer -D pulse set Capture toggle | gawk 'match($0, /(Front Left|Mono).*\[(.*)\]/, a) {print a[2]}' | xargs notify-send --hint=int:transient:1 -i "audio-input-microphone" "Mic switched: $1"