nixos-config/home-manager/wayland/eww/scripts/volume

11 lines
204 B
Bash
Executable file

#!/usr/bin/env bash
volume() {
echo '{"value":'$(pamixer --get-volume)',"muted":"'$(pamixer --get-mute)'"}'
}
volume
pw-mon -oa | stdbuf -o0 grep -os "changed:" | while read -r line; do
volume
done