#!/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