awesome-wm-widgets/spotify-widget
streetturtle e785d9cf85 fix #155 plus some improvements
- trim long artist/song names
- dim widget if spotify is paused
2020-06-12 15:52:05 -04:00
..
README.md spotify config 2019-05-03 20:28:50 -04:00
spo-wid-1.png update picture 2017-06-22 09:16:47 -04:00
spotify-widget-custom-paused.png fix #155 plus some improvements 2020-06-12 15:52:05 -04:00
spotify-widget-custom-playing.png fix #155 plus some improvements 2020-06-12 15:52:05 -04:00
spotify.lua fix #155 plus some improvements 2020-06-12 15:52:05 -04:00

README.md

Spotify widget

This widget displays currently playing song on Spotify for Linux client: screenshot and consists of two parts:

  • status icon which shows if music is currently playing
  • artist and name of the current song

Controls

  • left click - play/pause
  • scroll up - play next song
  • scroll down - play previous song

Dependencies

Note that widget uses the Arc icon theme, so it should be installed first under /usr/share/icons/Arc/ folder.

Customization

It is possible to customize widget by providing a table with all or some of the following config parameters:

Name Default Description
play_icon /usr/share/icons/Arc/actions/24/player_play.png Play icon
pause_icon /usr/share/icons/Arc/actions/24/player_pause.png Pause icon
font Play 9 Font

Example:

spotify_widget({
    font = 'Ubuntu Mono 9',
    play_icon = '/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg',
    pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg'
})

Gives following widget:

screenshot

Installation

First you need to have spotify CLI installed, it uses dbus to communicate with spotify-client:

git clone https://gist.github.com/fa6258f3ff7b17747ee3.git
cd ./fa6258f3ff7b17747ee3 
chmod +x sp
sudo cp ./sp /usr/local/bin/

Then clone repo under ~/.config/awesome/ and add widget in rc.lua:

local spotify_widget = require("awesome-wm-widgets.spotify-widget.spotify")
...
s.mytasklist, -- Middle widget
	{ -- Right widgets
    	layout = wibox.layout.fixed.horizontal,
		...
        -- default        
        spotify_widget(),
        -- customized
        spotify_widget({
           font = 'Ubuntu Mono 9',
           play_icon = '/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg',
           pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg'
        }),
		...