summaryrefslogblamecommitdiff
path: root/.local/bin/audio_mutemic
blob: 1a2f01a5b35b23c5ae3e3183afe733e0596e53ea (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                           
#! /bin/sh

# toggle mic mute and send notification about current state

wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle

command -v notify-send > /dev/null || exit
case "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" in
*\[MUTED\])
	notify-send " muted" "microphone  is muted"
	;;
*)
	notify-send " unmuted" "microphone  is unmuted"
	;;
esac