mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-28 04:20:03 +02:00
spotify: update spotify-clean to work with Pipewire 0.3.58
This commit is contained in:
parent
2015c5174b
commit
69933c7a42
1 changed files with 2 additions and 8 deletions
|
@ -3,13 +3,7 @@
|
||||||
# Kill all spotify streams, except the most recent one. We need to use
|
# 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.
|
# the serial to know which one this is as ID are not monotonous.
|
||||||
|
|
||||||
pw-cli dump short client \
|
pw-dump \
|
||||||
| grep -F 'ap="spotify"' \
|
| jq '.[]|select(.type == "PipeWire:Interface:Client" and .info.props."application.name" == "spotify").id' \
|
||||||
| cut -d: -f1 \
|
|
||||||
| while read id; do
|
|
||||||
echo $(pw-cli dump $id | sed -nE 's/^\s*object.serial = "([0-9]*)"/\1/p') $id
|
|
||||||
done \
|
|
||||||
| sort -n \
|
|
||||||
| cut -d' ' -f2 \
|
|
||||||
| head -n-1 \
|
| head -n-1 \
|
||||||
| xargs -trn1 pw-cli destroy
|
| xargs -trn1 pw-cli destroy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue