vincentbernat.i3wm-configur.../bin/spotify-clean
Vincent Bernat 4ca15b049d spotify: reenable spotify-clean
It seems the logic is OK. Just log the output of pw-cli dump short.
2022-07-27 22:30:34 +02:00

10 lines
229 B
Bash
Executable file

#!/bin/sh
# Kill all spotify streams, except the most recent one.
pw-cli dump short | grep spotify
pw-cli dump short client \
| grep -F 'ap="spotify"' \
| head -n-1 \
| cut -d: -f1 \
| xargs -rn1 pw-cli destroy