diff --git a/bin/chown-huawei-wmi.sh b/bin/chown-huawei-wmi.sh deleted file mode 100755 index b45c582..0000000 --- a/bin/chown-huawei-wmi.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -readonly WMI=/sys/devices/platform/huawei-wmi - -chmod g+w "$WMI/leds/platform::micmute/brightness" -chown root:huawei-wmi "$WMI/leds/platform::micmute/brightness" diff --git a/bin/initial-mic-state.sh b/bin/initial-mic-state.sh index 638a52e..a13bca7 100755 --- a/bin/initial-mic-state.sh +++ b/bin/initial-mic-state.sh @@ -4,7 +4,7 @@ pactl list sources | grep -qi "Mute: yes" state="$?" if [[ "$state" == "0" ]]; then - echo "1" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness + brightnessctl -d "platform::micmute" s 1 else - echo "0" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness + brightnessctl -d "platform::micmute" s 0 fi diff --git a/bin/toggle-mic-mute.sh b/bin/toggle-mic-mute.sh index f0ddbc4..d6fbdb2 100755 --- a/bin/toggle-mic-mute.sh +++ b/bin/toggle-mic-mute.sh @@ -11,11 +11,11 @@ if [[ "$state" == "0" ]]; then pactl set-source-mute @DEFAULT_SOURCE@ 0 dunstify -a "$appName" -u low -t 1000 -r "$id" "Actived microphone" "It's not muted now" - echo "0" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness + brightnessctl -d "platform::micmute" s 0 else # mic is not muted pactl set-source-mute @DEFAULT_SOURCE@ 1 dunstify -a "$appName" -u low -t 1000 -r "$id" "Disabled microphone" "It's muted now" - echo "1" >/sys/devices/platform/huawei-wmi/leds/platform::micmute/brightness + brightnessctl -d "platform::micmute" s 1 fi diff --git a/systemd/huawei-wmi-owner.service b/systemd/huawei-wmi-owner.service deleted file mode 100644 index 270d58c..0000000 --- a/systemd/huawei-wmi-owner.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Huawei WMI Privilege (other) -After=sys-devices-platform-huawei\x2dwmi.device - -[Service] -Type=oneshot -ExecStart=/home/daniil/dotfiles/bin/chown-huawei-wmi.sh - -[Install] -WantedBy=sys-devices-platform-huawei\x2dwmi.device