mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-04 18:24:38 +02:00
systemd: schedule cleaning of spotify PA streams
This commit is contained in:
parent
4ce36110d4
commit
325d7778d7
4 changed files with 22 additions and 1 deletions
7
bin/spotify-clean
Executable file
7
bin/spotify-clean
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
pactl list short clients \
|
||||
| awk '($3 == "spotify") {print $1}' \
|
||||
| sort -n \
|
||||
| head -n-1 \
|
||||
| xargs -rn1 pw-cli destroy
|
7
dotfiles/systemd/spotify-clean.service
Normal file
7
dotfiles/systemd/spotify-clean.service
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Clean spotify extra PulseAudio streams
|
||||
|
||||
[Service]
|
||||
ExecStart=%h/.config/i3/bin/spotify-clean
|
||||
Type=oneshot
|
||||
RemainAfterExit=false
|
6
dotfiles/systemd/spotify-clean.timer
Normal file
6
dotfiles/systemd/spotify-clean.timer
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Clean spotify extra PulseAudio streams
|
||||
After=pipewire-pulse.socket
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=1h
|
|
@ -6,9 +6,10 @@ Wants=dunst.socket
|
|||
Wants=easyeffects.service
|
||||
Wants=inputplug.service
|
||||
Wants=picom.service
|
||||
Wants=policykit-agent.service
|
||||
Wants=pipewire-pulse.socket
|
||||
Wants=policykit-agent.service
|
||||
Wants=redshift.service
|
||||
Wants=spotify-clean.timer
|
||||
Wants=ssh-agent.service
|
||||
Wants=xiccd.service
|
||||
Wants=xsettingsd.service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue