From 188d45b432214bb048e767c0f6c5a7b452925acb Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Tue, 19 Jul 2022 05:38:37 +0800 Subject: [PATCH] Added mic toggle script. --- .config/scripts/bin/toggle-mic-notify | 1 + .config/scripts/wm/toggle-mic-notify | 6 ++++++ 2 files changed, 7 insertions(+) create mode 120000 .config/scripts/bin/toggle-mic-notify create mode 100755 .config/scripts/wm/toggle-mic-notify diff --git a/.config/scripts/bin/toggle-mic-notify b/.config/scripts/bin/toggle-mic-notify new file mode 120000 index 0000000..980ec53 --- /dev/null +++ b/.config/scripts/bin/toggle-mic-notify @@ -0,0 +1 @@ +../wm/toggle-mic-notify \ No newline at end of file diff --git a/.config/scripts/wm/toggle-mic-notify b/.config/scripts/wm/toggle-mic-notify new file mode 100755 index 0000000..7e996e7 --- /dev/null +++ b/.config/scripts/wm/toggle-mic-notify @@ -0,0 +1,6 @@ +#!/bin/sh +amixer set Capture toggle @> /dev/null + +str=$(grep '\[on\]\|\[off\]' <<< $(amixer get Capture) | awk '{print $5}') +echo $str +notify-send "Microphone: $str"