config/eww : mise à jour

This commit is contained in:
Ahurac 2024-06-10 08:58:32 +02:00
parent 3c191ef7a6
commit baf758cf52

View file

@ -1,7 +1,13 @@
#!/usr/bin/env sh
pactl subscribe | grep --line-buffered "'change'" | while read -r _unused; do
printf '{"output-volume":%s,"input-volume":%s,"output-muted":%s}\n' \
print_sound_status() {
printf '{"output-volume":%s,"input-volume":%s,"output-muted":%s,"sink-name":%s}\n' \
"$(pamixer --get-volume)" \
"$(pamixer --get-volume --default-source)" \
"$(pamixer --get-mute)"
"$(pamixer --get-mute)" \
"$(pactl --format json list sinks | jq '.[] | select(.name == "'"$(pactl get-default-sink)"'") | .description')"
}
print_sound_status
pactl subscribe | grep --line-buffered "'change'" | while read -r _unused; do
print_sound_status
done