

ncspot, ncurses spotify client written in rust
source link: https://www.tuicool.com/articles/hit/rM7Rvee
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.
NOTE: ncspot is still in a very early development stage. Things will break and change. The feature set is still very limited. Also, as this is my first contact with Rust, some design decisions may need to be reworked in the future. Contributions welcome, but please be kind ;)
Requirements
- Rust
-
libpulse-dev
(orportaudio-dev
, if you want to use the PortAudio backend) -
libncurses-dev
andlibssl-dev
- A Spotify premium account
- pkg-config
Usage
- Set your login credentials (see configuration)
- Build using
cargo build --release
- The initial screen is the debug log. Press
F2
for the queue andF3
to search for a track. More key bindings are described below.
Key Bindings
These keybindings are hardcoded for now. In the future it may be desirable to have them configurable.
- Navigate through the screens using the F-keys:
-
F1
: Queue -
F2
: Search -
F3
: Playlistsd c
-
-
F9
: Debug log - Tracks and playlists can be played using
Return
and queued usingSpace
-
Shift-p
toggles playback of a track -
Shift-s
stops a track -
<
and>
play the previous or next track, respectively -
q
quits ncspot
You can also open a Vim style commandprompt using :
, the following commands are supported:
-
quit
: Quit ncspot -
toggle
: Toggle playback -
stop
: Stop playback -
previous
/next
: Play previous/next track -
clear
: Clear playlist
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
For now, a configuration file containing Spotify login data needs to be created manually, until a login-screen is implemented ( https://github.com/hrkfdn/ncspot/issues/1 ).
The file needs to look like this:
username = "spotify_user" password = "spotify_password"
Please save it to ~/.config/ncspot
.
Audio backends
By default ncspot is built using the PulseAudio backend. To make it use the PortAudio backend (e.g. for macOS, *BSD, ..), you need to recompile ncspot with the portaudio_backend
feature:
-
cargo run --no-default-features --features portaudio_backend
Recommend
-
44
README.md cfiles cfiles is a work in progress terminal file manager with vim like keybindings, written in C using the ncurses library. It...
-
28
Bitwise Terminal based bitwise calculator in curses Bitwise is multi base interactive calculator supporting dynamic base convertion and bit manipulation. It's a handy tool for low level hac...
-
57
Spotify TUI A Spotify client for the terminal written in Rust. Installation The binary executable is ...
-
43
readme.md Ly - a TUI display manager
-
3
ncmpcpp : ncurses based music player for Linux Apr 11, 2013 One of my previous post detailed a program called “task warrior” which has made managing my todo list from the console...
-
8
gdb Debugging Full Example (Tutorial): ncurses 09 Aug 2016 I'm a little frustrated with finding "gdb examples" online that show the commands but not their output. gdb is the GNU Debugger, the standard debugger on Linux. I wa...
-
10
sprite Sprite is an ncurses-based sprite editor. You can use it to create and share pixel art. By default, sprite sets up a 16x16 pixel canvas. If you'd like a larger 32x32 pixel canvas, start sprite with the -e flag. If your...
-
9
在 ncurses 中使用 readline 本文来自依云's Blog,转载请注明。
-
8
Writing Programs with NCURSEShttps://invisible-island.net/ncurses/ Writing Programs with NCURSES by Eric S...
-
9
MusicPlayerPlus MusicPlayerPlus is a character-based console and terminal window music player plus album cover art plus media fuzzy finder using fzf
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK