big refactoring

This commit is contained in:
2025-05-07 20:35:17 +02:00
parent 23010ee036
commit 1f045cdf5c
92 changed files with 378 additions and 1324 deletions

View File

@@ -0,0 +1,27 @@
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
# /-- Mic -->
if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q "yes"; then
eww update micClass="micOff"
eww update micIcon="󰍭"
else
eww update micClass="micOn"
eww update micIcon="󰍬"
fi
# /-- Speaker -->
if [[ "$mute" == "yes" ]]; then
eww update speakerClass="speakerOff"
eww update speakerIcon=""
elif [[ "$volume" -le 100 ]]; then
eww update speakerClass="speakerOn"
eww update speakerIcon=""
else
eww update speakerClass="speakerOn"
eww update speakerIcon=""
fi
echo "$volume"