Spotifyd is a client application for Spotify that allow to use Spotify without the ugly, slow and ram-eater desktop client. We can control spotifyd with the mobile client or the web client.
For example, i use web client to select my music. When i close the page, spotifyd continue playing my selected playlist. And then, i can stop the music with my android client (or KDE Connect ;-))
But have a con: Spotifyd will not work without Spotify Premium.
Step 1: Install devel dependencies
$ sudo dnf install alsa-lib-devel openssl-devel.x86_64 dbus-devel.x86_64 pulseaudio-libs-devel.x86_64 cargo.x86_64 make gcc
Step 2: Clone github repository
$ mkdir ~/src/ ; cd ~/src/ ; git clone git@github.com:Spotifyd/spotifyd.git
Step 3: Compile
$ cd ~/src/spotifyd ; cargo build --release --no-default-features --features pulseaudio_backend,dbus_keyring,dbus_mpris
Step 4: Config
$ cat << EOF > ~/.config/spotifyd
> [global]
> username = username
> password = password
> backend = pulseaudio
> device_name = NB048936
> bitrate = 320
> volume_normalisation = true
> normalisation_pregain = -10
> device_type = computer
> EOF
$
Step 5: Execute
$ ~/src/spotifyd/target/release/spotifyd --config-path=”~/.config/spotifyd”
Optional: Create a systemd service:
$ mkdir -p ~/.config/systemd/user/
$ cat << EOF > ~/.config/systemd/user/spotifyd.service
> [Unit]
> Description=A spotify playing daemon
> Documentation=https://github.com/Spotifyd/spotifyd
> Wants=sound.target
> After=sound.target
> Wants=network-online.target
> After=network-online.target
>
> [Service]
> ExecStart=/home/user/src/spotifyd/target/release/spotifyd --config-path=”/home/user/.config/spotifyd” --no-daemon
> Restart=always
> RestartSec=12
>
> [Install]
> WantedBy=default.target
> EOF
$ systemctl --user start spotifyd.service
$ systemctl --user enable spotifyd.service
Created symlink /home/user/.config/systemd/user/default.target.wants/spotifyd.service → /home/user/.config/systemd/user/spotifyd.service.
Step 6: Share and control
Open https://open.spotify.com and click on the devices. Then, select the Spotifyd ID. In my case: NB048936