diff options
| author | Spacedio <spacedio@thernusen.net> | 2026-06-04 20:46:42 -0400 |
|---|---|---|
| committer | Spacedio <spacedio@thernusen.net> | 2026-06-04 20:46:42 -0400 |
| commit | 2586197af1a1c4b419e6d3a7786128c6091ee939 (patch) | |
| tree | 2c0c12eb9fd7c7ed64aab21823dccbefb8594ce5 /polybar | |
| parent | 7846c1b33585a88333d2b0ac2270d0d304a2eeac (diff) | |
| download | dotfiles-2586197af1a1c4b419e6d3a7786128c6091ee939.tar.gz | |
Switched starting picom from .xprofile to i3 config. Corrected the mic check script for polybar
Diffstat (limited to 'polybar')
| -rwxr-xr-x | polybar/.config/polybar/scripts/mic-status.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/polybar/.config/polybar/scripts/mic-status.sh b/polybar/.config/polybar/scripts/mic-status.sh index aae580c..b068c27 100755 --- a/polybar/.config/polybar/scripts/mic-status.sh +++ b/polybar/.config/polybar/scripts/mic-status.sh @@ -1,5 +1,10 @@ #!/bin/bash +# Loops until pactl can successfully connect and find the default source +while ! pactl get-source-mute @DEFAULT_SOURCE@ &>/dev/null; do + sleep 0.5 +done + # Function to check the default source's mute status get_mic_status() { # We look for the default source and check its 'Mute' field @@ -7,7 +12,7 @@ get_mic_status() { # Convert the volume to percentage mic_percentage=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '/Volume:/ {print $2}' | xargs) - + if [ "$STATUS" = "yes" ]; then #echo " Muted" # Use your preferred icon/text echo " $mic_percentage" |
