summaryrefslogtreecommitdiffstats
path: root/py3status/modules
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2015-03-31 12:49:25 +0200
committerUltrabug <ultrabug@gentoo.org>2015-03-31 12:49:25 +0200
commitd788ae674cfb1610e2a12fe2df1e7f84bab7fd99 (patch)
tree15a062c43765568aa9b9b3c8769d43c17e509389 /py3status/modules
parentc8a385067c56d4600f61cee19624b2905dc89b97 (diff)
more QA on spotify module
Diffstat (limited to 'py3status/modules')
-rw-r--r--py3status/modules/spotify.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/py3status/modules/spotify.py b/py3status/modules/spotify.py
index bf3e222..068c656 100644
--- a/py3status/modules/spotify.py
+++ b/py3status/modules/spotify.py
@@ -2,11 +2,15 @@
"""
Display information about the current song playing on Spotify.
+Configuration parameters:
+ - cache_timeout : how often to update the bar
+ - format : see placeholders below
+
Format of status string placeholders:
- album - album name
- artist - artiste name (first one)
- time - time duration of the song
- title - name of the song
+ {album} - album name
+ {artist} - artiste name (first one)
+ {time} - time duration of the song
+ {title} - name of the song
i3status.conf example:
@@ -24,13 +28,10 @@ import dbus
class Py3status:
"""
- Configuration parameters:
- - cache_timeout : how often to update the bar
- - format : see placeholders below
"""
# available configuration parameters
- cache_timeout = 0
- format = "{artist} : {title}"
+ cache_timeout = 5
+ format = '{artist} : {title}'
def getText(self):
"""
@@ -51,7 +52,7 @@ class Py3status:
return self.format.format(title=title,
artist=artist, album=album, time=rtime)
except Exception:
- return "Spotify not running"
+ return 'Spotify not running'
def spotify(self, i3s_output_list, i3s_config):
"""