mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-16 13:14:20 +02:00
Revert "spotify: remove socket cleaning"
This reverts commit 2e4e2d311c
. Problem
is still here.
This commit is contained in:
parent
bb6c76f970
commit
8cd2ed3730
4 changed files with 24 additions and 0 deletions
8
bin/spotify-clean
Executable file
8
bin/spotify-clean
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Kill all spotify streams, except the most recent one.
|
||||
|
||||
pactl list short clients \
|
||||
| awk '($3 == "spotify") {print $1}' \
|
||||
| head -n-1 \
|
||||
| xargs -rn1 pacmd kill-client
|
8
dotfiles/systemd/spotify-clean.service
Normal file
8
dotfiles/systemd/spotify-clean.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Clean spotify extra PulseAudio streams
|
||||
After=sound.target
|
||||
|
||||
[Service]
|
||||
ExecStart=%h/.config/i3/bin/spotify-clean
|
||||
Type=oneshot
|
||||
RemainAfterExit=false
|
7
dotfiles/systemd/spotify-clean.timer
Normal file
7
dotfiles/systemd/spotify-clean.timer
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Timer for cleaning spotify extra PA streams
|
||||
After=pulseaudio.socket
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=1h
|
||||
OnStartupSec=1h
|
|
@ -8,6 +8,7 @@ Wants=picom.service
|
|||
Wants=pipewire-pulse.socket
|
||||
Wants=policykit-agent.service
|
||||
Wants=redshift.service
|
||||
Wants=spotify-clean.timer
|
||||
Wants=ssh-agent.service
|
||||
Wants=weather.timer
|
||||
Wants=wireplumber.service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue