From e9a68cce45a76c4c2564d806859c8fd8a427d56e Mon Sep 17 00:00:00 2001 From: streetturtle Date: Fri, 12 Jun 2020 19:37:21 -0400 Subject: Update readme --- spotify-widget/README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'spotify-widget/README.md') diff --git a/spotify-widget/README.md b/spotify-widget/README.md index 083963f..b1f8d25 100644 --- a/spotify-widget/README.md +++ b/spotify-widget/README.md @@ -1,9 +1,14 @@ # Spotify widget -This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](./spo-wid-default.png) and consists of two parts: +This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](./spo-wid-1.png) + +Some features: - status icon which shows if music is currently playing - artist and name of the current song + - dim widget if spotify is paused + - trim long artist/song names + - tooltip with more info about the song ## Controls @@ -24,6 +29,11 @@ It is possible to customize widget by providing a table with all or some of the | `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 | +| `dim_when_paused` | `false` | Decrease the widget opacity if spotify is paused | +| `dim_opacity` | `0.2` | Widget's opacity when dimmed, `dim_when_paused` should be set to `true` | +| `max_length` | `15` | Maximum lentgh of artist and title names. Text will be ellipsized if longer. | +| `show_tooltip` | `true`| Show tooltip on hover with information about the playing song | + ### Example: @@ -31,21 +41,29 @@ It is possible to customize widget by providing a table with all or some of the 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' + pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg', + dim_when_paused = true, + dim_opacity = 0.5, + max_length = -1, + show_tooltip = false }) ``` -Gives following widget: +Gives following widget + +Playing: +![screenshot](./spotify-widget-custom-playing.png) -![screenshot](./spo-wid-custom.png) +Paused: +![screenshot](./spotify-widget-custom-paused.png) ## Installation First you need to have spotify CLI installed, it uses dbus to communicate with spotify-client: ```bash -git clone https://gist.github.com/fa6258f3ff7b17747ee3.git -cd ./fa6258f3ff7b17747ee3 +git clone https://gist.github.com/wandernauta/6800547.git +cd ./6800547 chmod +x sp sudo cp ./sp /usr/local/bin/ ``` -- cgit v1.2.3