music: replace Spotify by Deezer

This commit is contained in:
Vincent Bernat 2024-03-23 08:18:26 +01:00
parent a0ce4d2894
commit 7086a909cf
7 changed files with 4 additions and 29 deletions

View file

@ -48,6 +48,7 @@ application_icons = {
"chromium": icon(3, ""), "chromium": icon(3, ""),
"d-feet": icon(2, ""), "d-feet": icon(2, ""),
"darktable": icon(2, ""), "darktable": icon(2, ""),
"deezer": icon(3, ""),
"discord": icon(3, ""), "discord": icon(3, ""),
"draw.io": icon(2, ""), "draw.io": icon(2, ""),
"easyeffects": icon(2, ""), "easyeffects": icon(2, ""),

View file

@ -45,7 +45,7 @@ media-playback-stop Stop
go-next Next track go-next Next track
audio-input-microphone Toggle microphone audio-input-microphone Toggle microphone
multimedia-volume-control Open mixer panel multimedia-volume-control Open mixer panel
com.spotify.Client Open Spotify dev.aunetx.deezer Open Deezer
EOF EOF
# Player status # Player status
@ -68,7 +68,7 @@ EOF
5) $playerctl next ;; 5) $playerctl next ;;
6) ~/.config/i3/bin/toggle-mute source ;; 6) ~/.config/i3/bin/toggle-mute source ;;
7) i3-msg '[class="Pavucontrol"] focus' || i3-msg exec exec pavucontrol ;; 7) i3-msg '[class="Pavucontrol"] focus' || i3-msg exec exec pavucontrol ;;
8) i3-msg '[class="Spotify"] focus' || i3-msg exec exec spotify ;; 8) i3-msg '[class="Deezer"] focus' || i3-msg exec exec dev.aunetx.deezer ;;
esac >&2 esac >&2
;; ;;
esac esac

View file

@ -1,9 +0,0 @@
#!/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

2
config
View file

@ -6,7 +6,7 @@ set $down k
set $left j set $left j
set $right semicolon set $right semicolon
set $term vbeterm set $term vbeterm
set $mediaplayer spotify set $mediaplayer MellowPlayer3
set $borderpx 3 set $borderpx 3
font pango:Iosevka Aile 9 font pango:Iosevka Aile 9

View file

@ -1,9 +0,0 @@
[Unit]
Description=Cleaner for Spotify extra PulseAudio streams
After=sound.target
[Service]
ExecStart=%h/.config/i3/bin/spotify-clean
Type=oneshot
RemainAfterExit=false
TimeoutStartSec=5s

View file

@ -1,7 +0,0 @@
[Unit]
Description=Timer for cleaning spotify extra PA streams
After=pulseaudio.socket
[Timer]
OnUnitActiveSec=1h
OnStartupSec=1h

View file

@ -8,7 +8,6 @@ Wants=picom.service
Wants=pipewire-pulse.socket Wants=pipewire-pulse.socket
Wants=policykit-agent.service Wants=policykit-agent.service
Wants=redshift.service Wants=redshift.service
Wants=spotify-clean.timer
Wants=ssh-agent.service Wants=ssh-agent.service
Wants=weather.timer Wants=weather.timer
Wants=wireplumber.service Wants=wireplumber.service