From 1f70822e40ca6c624e66bec06fa07d6cf2892fa1 Mon Sep 17 00:00:00 2001 From: Gabubu <88589756+GabubuAvailable@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:41:17 +0000 Subject: [PATCH] added module_mic (sadly uses only pulseaudio) --- modules.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules.sh b/modules.sh index 0c651ee..e84fdfc 100755 --- a/modules.sh +++ b/modules.sh @@ -26,6 +26,10 @@ module_vol() { export bar="${bar}${1}$(if command -v pamixer > NULL; then pamixer --get-volume; else amixer sget Master | awk -F'[][]' '/Mono:/ { print $2 }'; fi)${2}" } +module_mic() { + export bar="${bar}${1}$(if pamixer --source 1 --get-mute | grep -q 'true'; then echo "OFF"; else echo "ON"; fi)${2}" +} + module_kernel() { export bar="${bar}${1}$(sed "s/version // ; s/ (.*//" /proc/version)${2}" }