add waybar component for microphone state

This commit is contained in:
2022-06-11 15:04:11 +03:00
parent e248139d5b
commit 80581b2eb5
3 changed files with 22 additions and 1 deletions

8
bin/mic-state.sh Executable file
View File

@@ -0,0 +1,8 @@
#! /bin/bash
state=$(pactl get-source-mute $(pactl get-default-source) | awk '{printf $2}')
result='{"text": "", "alt": "'
result+="$state\"}"
echo "$result"