2023-04-15 09:46:19 +05:30
2023-04-15 08:08:02 +05:30
2023-04-15 00:59:57 +05:30
2023-04-15 09:01:21 +05:30
2023-04-13 07:47:54 +05:30
2023-04-15 09:01:21 +05:30
2023-04-15 09:01:21 +05:30
2023-01-21 00:13:49 +05:30
2023-04-15 09:01:21 +05:30
2023-04-15 09:28:16 +05:30

gspt


mascot
Spotify for terminal written in Go.
with builtin cover-art view and much more.
Documentation | Discussion


In a very experimental stage.

Building

$ git clone https://github.com/aditya-K2/gspt.git
$ cd gspt
$ go build -v

Installing

$ sudo install -D gspt -t "/usr/bin/"

You can merge them into a one liner

git clone https://github.com/aditya-K2/gspt && cd gspt && GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" go build -v && sudo install -D gspt -t "/usr/bin/"

Please Note

  • You will need Spotify Premium to use gspt.
  • gspt uses the Web API from Spotify, which doesn't handle streaming itself. So you'll need either an official Spotify client open or a lighter weight alternative such as spotifyd.

Setup

How to Generate an API Key from Spotify Dashboard

If you want to use Spotify's API to create applications that interact with their music streaming service, you will need an API key. Here's how you can generate one from the Spotify Dashboard:

  1. Go to the Spotify Developer Dashboard and log in with your Spotify account credentials.

  2. Click on the "Create an App" button to create a new application.

    Create an App

  3. Give your application a name and description, and agree to the terms of service. In the Redirect URI section add http://localhost:8080/callback as a callback URL. This is necessary for the OAuth 2.0 authentication flow to work. Click on "Create" to proceed. Create an App Form

  4. On the next page, you'll see the details of your newly created application. In the Settings Look for the section labeled "Client ID" and click on the "Show Client Secret" button.

  5. You will now see your Client ID and Client Secret. You will need both of these to use the Spotify API in gspt

$ export SPOTIFY_ID= # client id
$ export SPOTIFY_SECRET= # client secret
  1. After this you can just run gspt. And follow the link that it generates, and Login.
$ gspt

Key bindings

  1. d Opens the device menu to choose a device from
  2. 1, 2, 3 Switch between the views
  3. Enter - Selects an entry
  4. ? Search
  5. Ctrl-P starts playing the entry under the cursor in some views (PlaylistNavigator, Albums, etc.)

Config Options

Config file can be defined at $HOME/.config/gspt/config.yaml

Note: Configuration is live updated when you make a change

Following Options are configurable

    # Following are the default values
    cache_dir: $XDG_CACHE_HOME # Path to where the cached images should be stored.
    redraw_interval: 500
    additional_padding_x : 12
    additional_padding_y : 16
    image_width_extra_x : -1.5
    image_width_extra_y : -3.75
    colors:
        artist:
            fg: Pink
            bg: ""
            bold: false
            italic: false
        album:
            fg: Green
            bg: ""
            bold: false
            italic: false
        track:
            fg: Blue
            bg: ""
            bold: false
            italic: false
        genre:
            fg: DarkCyan
            bg: ""
            bold: true
            italic: false
        timestamp:
            fg: Red
            bg: ""
            bold: false
            italic: true
        pbar_artist:
            fg: Blue
            bg: ""
            bold: true
            italic: false
        pbar_track:
            fg: Green
            bg: ""
            bold: true
            italic: true
        playlist_nav:
            fg: Coral
            bg: ""
            bold: false
            italic: false
        nav:
            fg: PapayaWhip
            bg: ""
            bold: false
            italic: false
        context_menu:
            fg: Turquoise
            bg: ""
            bold: true
            italic: false
Description
No description provided
Readme GPL-3.0 2.5 MiB
Languages
Go 98.9%
Makefile 1.1%