From 1f974087090cc70cdd98dfaab0c0b046356d493f Mon Sep 17 00:00:00 2001 From: Raphael Scholer Date: Wed, 19 Aug 2015 07:51:52 +0200 Subject: [PATCH] cmus - Allow changing of output when cmus is not running This closes enkore/i3pystatus#226 --- i3pystatus/cmus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/i3pystatus/cmus.py b/i3pystatus/cmus.py index 37e3b1c..5474ab6 100644 --- a/i3pystatus/cmus.py +++ b/i3pystatus/cmus.py @@ -31,12 +31,14 @@ class Cmus(IntervalModule): settings = ( ('format', 'formatp string'), + ('format_not_running', 'Text to show if cmus is not running'), ('color', 'The color of the text'), ('status', 'Dictionary mapping status to output'), ) color = '#909090' format = '{status} {song_elapsed}/{song_length} {artist} - {title}' + format_not_running = 'Not running' interval = 1 status = { 'paused': '▷', @@ -71,7 +73,7 @@ class Cmus(IntervalModule): def run(self): self.output = { - 'full_text': 'Not running', + 'full_text': self.format_not_running, 'color': self.color } response = self._query_cmus()