All Projects → PrayagS → Polybar Spotify

PrayagS / Polybar Spotify

🎵 Spotify status and controls module for Polybar with text scrolling

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Polybar Spotify

Ablemusicplayer
🎵 A Youtube Music like app with a Spotify like design - ad free and open source. Feel free to PR. NOTE: BEING REWRITTEN, HENCE THE REPO WILL BE INACTIVE FOR A WHILE
Stars: ✭ 167 (+3.09%)
Mutual labels:  hacktoberfest, spotify
Spotify Dart
A dart library for interfacing with the Spotify API.
Stars: ✭ 109 (-32.72%)
Mutual labels:  hacktoberfest, spotify
Spotifylyrics
Fetches and displays lyrics to currently playing song in Spotify, Tidal and VLC.
Stars: ✭ 171 (+5.56%)
Mutual labels:  hacktoberfest, spotify
Spotify Playlist Archive
Daily snapshots of public Spotify playlists
Stars: ✭ 111 (-31.48%)
Mutual labels:  hacktoberfest, spotify
Counsel Spotify
Control Spotify App through Emacs
Stars: ✭ 49 (-69.75%)
Mutual labels:  hacktoberfest, spotify
So Nice
Small Web interface to control iTunes, Spotify, Rdio, MPD, Rhythmbox, Amarok and XMMS2. ♫
Stars: ✭ 141 (-12.96%)
Mutual labels:  hacktoberfest, spotify
Trango Self Hosted
Host trango and communicate with those around you without the internet!
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest
Django Loci
Reusable Django app for storing geographic and indoor coordinates. Maintained by the OpenWISP Project.
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest
Tip4commit
Donate bitcoins to open source projects or make commits and get tips for it.
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Titanium
A keyboard-driven web browser written in Rust
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Supervisor
PHP library for managing Supervisor through XML-RPC API
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Buttercup Browser Extension
🌏 Buttercup browser extension
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest
Rapidbay
Self-hosted torrent video streaming service compatible with Chromecast and AppleTV deployable in the cloud
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Jackson Core
Core part of Jackson that defines Streaming API as well as basic shared abstractions
Stars: ✭ 2,003 (+1136.42%)
Mutual labels:  hacktoberfest
Go Openvswitch
Go packages which enable interacting with Open vSwitch and related tools. Apache 2.0 Licensed.
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest
Web Term
📺 A fullscreen terminal in your browser.
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Matrix Appservice Slack
A Matrix <--> Slack bridge
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest
Stat.ink
https://stat.ink/
Stars: ✭ 163 (+0.62%)
Mutual labels:  hacktoberfest
Templates
Tasmota Device Templates Repository. Your one stop shop to get templates for devices running Tasmota!
Stars: ✭ 162 (+0%)
Mutual labels:  hacktoberfest
Fuzzinator
Fuzzinator Random Testing Framework
Stars: ✭ 164 (+1.23%)
Mutual labels:  hacktoberfest

polybar-spotify

This polybar module shows details regarding the currently playing song on Spotify. The unique feature of this module is that the text displayed is constantly scrolled to save space on the bar. This is something that is not found in other spotify modules I came across. Also, this module uses playerctl to do all the work and hence, no >100 line scripts which do all the work themselves. Only one line to fetch the required metadata in the format that you like and another line to scroll the fetched text using zscroll.

Dependencies

  • playerctl - To interface with Spotify and other MPRIS supporting players
  • zscroll - To scroll the fetched text

Setup

  • Make sure to go through and edit the required variables in get_spotify_status.sh as shown below. Especially the PARENT_BAR one as without its correct value, toggling the play-pause symbol wouldn't work.
# The name of polybar bar which houses the main spotify module and the control modules.
PARENT_BAR="now-playing"

# Set the source audio player here.
# Players supporting the MPRIS spec are supported.
# Examples: spotify, vlc, chrome, mpv and others.
# Use `playerctld` to detect the latest player.
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
PLAYER="playerctld"

# Format of the information displayed
# Eg. {{ artist }} - {{ album }} - {{ title }}
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
FORMAT="{{ title }} - {{ artist }}"
  • Add the following in your polybar config. Make sure to place the desired symbols for each module. You can get them from like Font Awesome or Nerd Fonts.
[module/spotify]
type = custom/script
tail = true
; prefix symbol is shown before the text
format-prefix = "<prefix-symbol>"
format = <label>
exec = ~/.config/polybar/scripts/scroll_spotify_status.sh

[module/spotify-prev]
type = custom/script
exec = echo "<previous-song-symbol>"
format = <label>
click-left = playerctl previous spotify

[module/spotify-play-pause]
type = custom/ipc
hook-0 = echo "<playing-symbol>"
hook-1 = echo "<pause-symbol>"
initial = 1
click-left = playerctl play-pause spotify

[module/spotify-next]
type = custom/script
exec = echo "next-song-symbol"
format = <label>
click-left = playerctl next spotify

NOTE: The above given play-pause module requires IPC support enabled for its parent bar. That can be done by adding enable-ipc = true in your bar config.

Customization

  • Since I'm using playerctl, this script will work with any of the players supported by it. For instance, VLC, Chromium, Audacious, etc. It can even be used with multiple players running simultaneously. More info here.
  • The format of the fetched metadata can be changed in get_spotify_status.sh. This line needs to be changed
    playerctl metadata spotify --format "{{ title }} - {{ artist }}"
    
    More details on what attributes can be fetched can be found here.
  • The scrolling text can be configured in scroll_spotify_status.sh.
    • The length can be configured using -l and delay using -d.
    • The separators between the infinitely scrolling text can be configured using --before-text and --after-text parameters.
      More info about zscroll's parameters can be found in man zscroll.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].