Skip to main content

Yet Another Spotify Command Line Lyrics

Lyrics-Screenshot

Requirements

  • Linux
  • Python >= 3.6
  • ueberzug
  • dbus-python
  • requests
  • beautifulsoup4
  • lxml

Install

From PyPI

pip3 install yet-another-spotify-lyrics --user

From Source

git clone https://github.com/goktug97/yet-another-spotify-lyrics
cd yet-another-spotify-lyrics
python setup.py install --user

Usage

Usage Gif

spotify-lyrics

Keybindings

Action Keybinding
Scroll Up k
Scroll Down j
Beginning of Lyrics gg
End of Lyrics G
Edit Lyrics e
Refresh r
Toggle t
Next n
Prev p
Update Lyrics d
Toggle Album Cover i
Help h
Quit Program q
  • Edit Lyrics: Open lyrics in $EDITOR.
  • Refresh: Refresh lyrics and song metadata.
  • Toggle: Play or Pause currently playing song.
  • Next: Play next song.
  • Prev: Play previous song.
  • Update Lyrics: Deletes cached lyrics and fetches lyrics from the internet.
  • Help: Show keybindings 5 seconds.

DBUS

The lyrics can be scrolled via dbus. Scroll the lyrics without changing the focus.

Python Example

import dbus

bus = dbus.SessionBus()
lyrics = bus.get_object('com.spotify_lyrics.line', '/com/spotify_lyrics')
lyrics.move(1) # Scroll Down
lyrics.move(-1) # Scroll Up

Bash Example

#!/usr/bin/env bash
dbus-send --print-reply --dest="com.spotify_lyrics.line"\
    "/com/spotify_lyrics"\
    "com.spotify_lyrics.line.move"\
    int32:$1 > /dev/null

I call this bash script from my i3 config. See below.

Example Use Case (i3wm)

bindsym $mod+Shift+Home exec st -n Lyrics -e spotify-lyrics
for_window [instance="Lyrics"] floating enable; [instance="Lyrics"] move position center
for_window [instance="Lyrics"] resize set 644 388
bindsym $mod+Control+k exec lyrics-move -1
bindsym $mod+Control+j exec lyrics-move 1

Example Use Case (Emacs)

Open the lyrics in a buffer.

(defun spotify-lyrics ()
  (interactive)
  (let ((string (shell-command-to-string "spotify-lyrics-once")))
    (get-buffer-create "lyrics-buffer")
    (switch-to-buffer-other-window "lyrics-buffer")
    (with-current-buffer "lyrics-buffer"
      (goto-char (point-max))
      (erase-buffer)
      (insert string)
      (goto-line 1))))

Example Use Case (Conky)

You can use spotify-lyrics-once to output the lyrics to the stdout and exit. If you have program that utilizes stdin, you can use this version. An example for such program is Conky.

#!/usr/bin/lua
conky.config = {
	alignment = 'tl',
	background = true,
	color2 = '2ECC71',
	cpu_avg_samples = 2,
	default_color = 'FFFFFF',
	double_buffer = true,
	font = 'Bitstream Vera Sans:size=10',
	gap_x = 30,
	gap_y = 50,
	minimum_width = 200,
	no_buffers = true,
	own_window = true,
	own_window_type = 'override',
	own_window_transparent = true,
	own_window_argb_visual = true,
	-- own_window_type = 'desktop',
	update_interval = 3,
	use_xft = true,
}
conky.text = [[
${voffset 8}$color2${font Bitstream Vera Sans:size=16}${time %A}$font\
${voffset -8}$alignr$color${font Bitstream Vera Sans:size=38}${time %e}$font
$color${voffset -30}$color${font Bitstream Vera Sans:size=18}${time %b}$font\
${voffset -3} $color${font Bitstream Vera Sans:size=20}${time %Y}$font$color2$hr
${execi 5 spotify-lyrics-once}
]]

License

yet-another-spotify-lyrics is licensed under the MIT License.

Metadata

Release files for yet-another-spotify-lyrics 2.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yet-another-spotify-lyrics 2.4.6
File Size Uploaded Provenance Actions
yet-another-spotify-lyrics-2.4.6.tar.gz 15.1 MB Without provenance Details for yet-another-spotify-lyrics-2.4.6.tar.gz

Release files / yet-another-spotify-lyrics-2.4.6.tar.gz

Download URL yet-another-spotify-lyrics-2.4.6.tar.gz
Size 15.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a91dd1964d26482796506370394e014bcf76135a15fd19b13bfceb8f453ce6c3
BLAKE2b-256 checksum
How to use checksums
7f15d2a03639c23f403ea281c3003a544c1e6fdc716fce9e1b340e7bfaeb57db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.11.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for yet-another-spotify-lyrics 2.4.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page