From 1a762b9afe8ebfe46c95c1e9650c5799a46db138 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Fri, 18 Jul 2014 00:08:03 +0300 Subject: [PATCH] [mpd] Add color setting --- i3pystatus/mpd.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/i3pystatus/mpd.py b/i3pystatus/mpd.py index 66438c9..0363c2b 100644 --- a/i3pystatus/mpd.py +++ b/i3pystatus/mpd.py @@ -30,7 +30,8 @@ class MPD(IntervalModule): ("host"), ("port", "MPD port"), ("format", "formatp string"), - ("status", "Dictionary mapping pause, play and stop to output") + ("status", "Dictionary mapping pause, play and stop to output"), + ("color", "The color of the text"), ) host = "localhost" @@ -43,6 +44,7 @@ class MPD(IntervalModule): "play": "▶", "stop": "◾", } + color = "#FFFFFF" vol = 100 @@ -88,9 +90,11 @@ class MPD(IntervalModule): } self.output = { "full_text": formatp(self.format, **fdict).strip(), + "color": self.color, } except Exception as e: - self.output = {"full_text": "error connecting MPD"} + self.output = {"full_text": "error connecting MPD", + "color": self.color} def on_leftclick(self): try: