Back to Home

My /comfy/ and less bloated spotify-tui setup

Posted on Wednesday, 3 June 2020 - Suggest An Edit
#linux

Introduction

Hi! This time I will explain about how I setup my spotifyd + spotify-tui to enjoy music from spotify without their resource heavy app. It’s not Spotify’s fault, it’s Electron. Not that I hate it, I think it’s awesome. It just feels heavy on my machine. I still have 4GB of RAMs lol, so that’s reasonable.

Spotifyd

What Is Spotifyd?

Spotifyd is the daemon that is used to run spotify-tui. So, basically spotify-tui is just a front-end for spotify that needs some sort of daemon. You can use spotify-tui with any official Spotify client. For example, spotify-tui will read your phone as an available device but that will be a hassle having to open spotify on your phone to use spotify on your desktop.

Spotifyd provides a service that can be used to play spotify. It’s more lightweight and supports more platform than the official client. You can check their github page for more details.

Installation

I’m using Arch so I will use the almighty AUR to make my life easier. If you’re on any other distro, you can either take the binary or build it yourself. To install it on Arch (or any Arch based distro), you can use any AUR helper or download the PKGBUILD and run makepkg -si.

# yay
$ yay -S spotifyd-full

# trizen
$ trizen spotifyd-full

I personally use spotifyd-full from AUR. Spotify-full is spotifyd with all feature flags enabled. If you want a minimal install, you can use spotifyd instead. If you don’t like to wait for it to compile, just take one with -bin suffix. For more details on feature flags, you can refer to their github page.

Configuration

Configuring spotifyd is quite easy actually, they gave you a default configuration to help you get going. Here’s mine.

[global]
username = <your username>
password = <your password>
# password_cmd = command_that_writes_password_to_stdout
# use_keyring = true
backend = pulseaudio
# device = alsa_audio_device
# control = alsa_audio_device
# mixer = PCM
volume_controller = alsa_linear
device_name = arch
bitrate = 320
cache_path = /home/elianiva/.config/spotifyd
no_audio_cache = false
volume_normalisation = true
normalisation_pregain = -4
device_type = computer

I’ll explain the configuration briefly.

Now that spotifyd has been configured, let’s move on to spotify-tui itself.

Spotify TUI

What Is Spotify Tui?

Spotify TUI is a spotify client or frontend based on Terminal User Interface written in Rust. It’s an awesome alternative for the official Spotify client.

I like this software because it’s lightweight and it’s based on TUI which can be controlled fully with a keyboard. I also like its UI, it’s simple and straight forward. For more details about this software, you can visit their github page.

Installation

Installing spotify-tui is pretty straight forward. I use Arch so I can just use AUR. If you’re on the other distro, check out their readme for installation.

# yay
$ yay -S spotify-tui

# trizen
$ trizen spotify-tui

After installing it, the executable binary is called spt. I got confused the first time I installed it because I missed the part where it says

The binary executable is spt

So don’t get confused when you type spotify-tui and nothing happens.

Authentication

Spotify-tui needs to be authenticated by spotify. Don’t worry though, it’s super simple. Just run spt and fill out the needed field which are:

After filling those out, you will get redirected to Spotify website that ask for your permissions.

Configuration

There’s a lot of spotify-tui configuration which can make this post longer. I use the default configuration for it and satisfied enough. If you want to configure it yourself, please refer to their guide.

Conclusion

There we have it. Spotifyd + Spotify-tui. A Lightweight alternative for the official spotify client. Unfortunately, this setup doesn’t support offline mode yet. I would really like to see this feature implemented. Huge thank you goes to the developers of spotifyd and spotify-tui. Anyway, thanks for reading my post and have a nice day!

Comments