Coder Social home page Coder Social logo

polybar-spotify's Introduction

polybar-spotify

This is a module that shows the current song playing and its primary artist on Spotify, with a Spotify-green underline, for people that don't want to set up mpd. If Spotify is not active, nothing is shown. If the song name is longer than trunclen characers (default 25), it is truncated and ... is appended. If the song is truncated and contains a single opening parenthesis, the closing paranethsis is appended as well.

Dependencies

  • Python (2.x or 3.x)
  • Python dbus module

sample screenshot

Settings

[module/spotify]
type = custom/script
interval = 1
format-prefix = "īƒ¬ "
format = <label>
exec = python /path/to/spotify/script -f '{artist}: {song}'
format-underline = #1db954

Custom arguments

Truncate

The argument "-t" is optional and sets the trunlen. It specifies the maximum length of the printed string, so that it gets truncated when the specified length is exceeded. Defaults to 35.

Override example:

exec = python /path/to/spotify/script -t 42
Format

The argument "-f" is optional and sets the format. You can specify how to display the song and the artist's name, as well as where (or whether) to print the play-pause indicator.

Override example:

exec = python /path/to/spotify/script -f '{play_pause} {song} - {artist} - {album}'

This would output "Lone Digger - Caravan Palace - <IĀ°_Ā°I>" in your polybar, instead of what is shown in the screenshot.

Status indicator

The argument "-p" is optional, and sets which unicode symbols to use for the status indicator. These should be given as a comma-separated string, with the play indicator as the first value and the pause indicator as the second.

Override example:

exec = python /path/to/spotify/script -p '[playing],[paused]'
Fonts

The argument "--font" is optional, and allow to specify which font from your Polybar config to use to display the main label.

Override example:

exec = python /path/to/spotify/script --font=1

The argument "--playpause-font" is optional, and allow to specify which font from your Polybar config to use to display the "play/pause" indicator.

Override example:

exec = python /path/to/spotify/script -p '[playing],[paused]' --playpause-font=2
Quiet

The argument "-q" or "--quiet" is optional and specifies whether to display the output when the current song is paused. This will make polybar only show a song title and artist (or whatever your custom format is) when the song is actually playing and not when it's paused. Simply setting the flag on the comand line will enable this option.

Override example:

exec = python /path/to/spotify/script -q

polybar-spotify's People

Contributors

jvanrhijn avatar vincinator avatar george-lewis avatar fmeinicke avatar ifreilicht avatar martinlatrille 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.