ncspot

Crates.io Gitter Build Snap Status

Packaging status

ncspot ncspot

ncurses Spotify client written in Rust using librespot. It is heavily inspired by ncurses MPD clients, such as ncmpc. My motivation was to provide a simple and resource friendly alternative to the official client as well as to support platforms that currently don't have a Spotify client, such as the *BSDs.

Search

Resource footprint comparison

Measured using ps_mem on Linux during playback:

| Client | Private Memory | Shared Memory | Total | | --- | --- | --- | --- | | ncspot | 22.1 MiB | 24.1 MiB | 46.2 MiB | | Spotify | 407.3 MiB | 592.7 MiB | 1000.0 MiB |

Requirements

On Debian based systems you need following packages for development headers: sudo apt install libncursesw5-dev libdbus-1-dev libpulse-dev libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev

For Fedora, these dependencies are required: dnf install pulseaudio-libs-devel libxcb-devel openssl-devel ncurses-devel dbus-devel

Usage

Audio backends

By default ncspot is built using the Rodio backend. To make it use the PortAudio backend (e.g. for *BSD or macOS), you need to recompile ncspot with the portaudio_backend feature:

Key Bindings

The keybindings listed below are configured by default. Additionally, if you run ncspot with MPRIS support, you may be able to use media keys to control playback depending on your desktop environment settings. Have a look at the configuration section if you want to set custom bindings.

You can also open a Vim style commandprompt using :, the following commands are supported:

The screens can be opened with queue, search, playlists and log, whereas search can be supplied with a search term that will be entered after opening the search view.

Configuration

Configuration is saved to ~/.config/ncspot/config.toml. Possible configuration values are:

Keybindings can be configured in [keybindings] section in config.toml, e.g. as such:

[keybindings] "Shift+i" = "seek +10000"

See the help screen by pressing ? for a list of possible commands.

ncspot will respect system proxy settings defined via the http_proxy environment variable.

Initial state

The initial state can be specified in the configuration. It allows for example enabling shuffle per default. Following entries can be added to the configuration file:

[saved_state] volume = 80 repeat = "track" shuffle = true

Theming

The color palette can be modified in the configuration. For instance, to have ncspot match Spotify's official client, you can add the following entries to the configuration file:

[theme] background = "black" primary = "light white" secondary = "light black" title = "green" playing = "green" playing_selected = "light green" playing_bg = "black" highlight = "light white" highlight_bg = "#484848" error = "light white" error_bg = "red" statusbar = "black" statusbar_progress = "green" statusbar_bg = "green" cmdline = "light white" cmdline_bg = "black"

More examples can be found in pull request https://github.com/hrkfdn/ncspot/pull/40.