From 2586197af1a1c4b419e6d3a7786128c6091ee939 Mon Sep 17 00:00:00 2001 From: Spacedio Date: Thu, 4 Jun 2026 20:46:42 -0400 Subject: Switched starting picom from .xprofile to i3 config. Corrected the mic check script for polybar --- polybar/.config/polybar/scripts/mic-status.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'polybar') 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" -- cgit v1.2.3