GithubHelp home page GithubHelp logo

xentrick / ncspot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hrkfdn/ncspot

0.0 1.0 0.0 707 KB

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.

License: BSD 2-Clause "Simplified" License

Rust 100.00%

ncspot's Introduction

ncspot

Gitter Build Status

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

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
  • Python 3 (needed for building rust-xcb dependency)
  • libasound2-dev (or portaudio-dev, if you want to use the PortAudio backend)
  • libncurses-dev and libssl-dev
  • libdbus-1-dev
  • libxcb + development headers (for clipboard access)
  • A Spotify premium account
  • pkg-config

On Debian based systems you need following packages for libxcb developement headers:

sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev

Usage

  • Build using cargo build --release
  • For debugging, pass a debug log filename, e.g. ncspot -d debug.log

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
      • c clears the entire queue
      • d deletes the currently selected track
      • Ctrl-s opens a dialog to save the queue to a playlist
    • F2: Search
    • F3: Library
      • d deletes the currently selected playlist
  • Tracks and playlists can be played using Return and queued using Space
  • s will save, d will remove the currently selected track to/from your library
  • o will open a detail view or context menu for the selected item
  • Shift-o will open a context menu for the currently playing track
  • a will open the album view for the selected item
  • A will open the artist view for the selected item
  • Backspace closes the current view
  • Shift-p toggles playback of a track
  • Shift-s stops a track
  • Shift-r updates the playlist cache
  • < and > play the previous or next track
  • , and . to rewind or skip forward
  • r to toggle repeat mode
  • z to toggle shuffle playback
  • q quits ncspot
  • x copies a sharable URL to the song to the system clipboard
  • Shift-x copies a sharable URL to the currently selected item to the system clipboard

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
  • share [current | selected]: Copies a sharable URL of either the selected item or the currernt song to the system clipboard

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.

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_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 hrkfdn#40.

Audio backends

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

  • cargo run --no-default-features --features portaudio_backend,cursive/pancurses-backend

ncspot's People

Contributors

hrkfdn avatar koffeinflummi avatar herbstein avatar osm avatar medwards avatar andrewhalle avatar felipesere avatar maxking avatar saethlin avatar jwijenbergh avatar xentrick avatar sajattack avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.