#!/bin/sh # Kill all spotify streams, except the most recent one. We need to use # the serial to know which one this is as ID are not monotonous. pw-dump \ | jq '.[]|select(.type == "PipeWire:Interface:Client" and .info.props."application.name" == "spotify").id' \ | head -n-1 \ | xargs -trn1 pw-cli destroy