aboutsummaryrefslogtreecommitdiffstats
path: root/polybar/.config
diff options
context:
space:
mode:
authorSpacedio <spacedio@thernusen.net>2026-06-04 20:46:42 -0400
committerSpacedio <spacedio@thernusen.net>2026-06-04 20:46:42 -0400
commit2586197af1a1c4b419e6d3a7786128c6091ee939 (patch)
tree2c0c12eb9fd7c7ed64aab21823dccbefb8594ce5 /polybar/.config
parent7846c1b33585a88333d2b0ac2270d0d304a2eeac (diff)
downloaddotfiles-2586197af1a1c4b419e6d3a7786128c6091ee939.tar.gz
Switched starting picom from .xprofile to i3 config. Corrected the mic check script for polybar
Diffstat (limited to 'polybar/.config')
-rwxr-xr-xpolybar/.config/polybar/scripts/mic-status.sh7
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"