#!/bin/sh pw-dump --monitor | jq -r --unbuffered ' .[] | select( .type? == "PipeWire:Interface:Node" and (.info?."change-mask"? | any(. == "params")) and .info?.props."media.class" == "Audio/Sink" and .info?.params.Props != null ) | .info.params.Props | .[] | select(.channelVolumes != null) | .channelVolumes[0] ' | while read -r v; do printf '%.0f\n' "$(printf 'e(l(%f)/3)*100\n' "$v" | bc -l 2>/dev/null)" 2>/dev/null || true done