set initial mic state on startup

This commit is contained in:
2022-06-13 22:58:16 +03:00
parent 1fdb737101
commit 09bd6f4c74
2 changed files with 11 additions and 0 deletions

10
bin/initial-mic-state.sh Executable file
View File

@@ -0,0 +1,10 @@
#! /bin/bash
pactl list sources | grep -qi "Mute: yes"
state="$?"
if [[ "$state" == "0" ]]; then
echo "0" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness
else
echo "1" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness
fi