April fools fun – set volume to battery level

This will set your Linux system’s volume to the battery level of a remote smartphone somewhere in your Wifi. Yes, some preparations need to be done so that it works.

vol=´adb connect 192.168.10.23:5555 2>&1 > /dev/null; adb shell dumpsys battery | grep level | cut -c 9-12; adb disconnect >/dev/null´; pactl set-sink-volume bluez_sink.0C_A6_94_AA_77_5D.a2dp_sink $vol%

(Inspired by: https://nitter.net/0xDesigner/status/1642554817590566915#m)