summaryrefslogtreecommitdiffhomepage
path: root/src/lib/Music.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Music.hs')
-rw-r--r--src/lib/Music.hs23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/lib/Music.hs b/src/lib/Music.hs
index 3d298df..5544d50 100644
--- a/src/lib/Music.hs
+++ b/src/lib/Music.hs
@@ -3,14 +3,13 @@ module Music where
import Xmobar
import Monitors
import qualified Bottom
-import Config (defaultHeight, pIsLight)
+import Config (defaultHeight, pIsLight, fc)
import GMPDP (GMPDP(..))
mpris client width =
Mpris2 client -- "clementine" --
- ["-t", " <fn=0><tracknumber>\
- \ <title> <fc=sienna4><artist></fc>\
- \ <album> <length></fn>"
+ ["-t", " <tracknumber> <title> " ++ fc "sienna4" "<artist>"
+ ++ " <album> <length>"
, "-T", show width, "-E", "…", "-M", "100", "-x", ""] 10
mprisConfig client p = Bottom.config [Run (mpris client 165)] "|mpris2|" p
@@ -19,18 +18,14 @@ mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t"
, " <lapsed> <fc=honeydew3><fn=5><bar></fn></fc>"] 10 -- fn=5
+mpdt' c0 c1 c2 = "<ppos>/<plength> "
+ ++ fc c0 "<title> " ++ fc c1 "<artist> " ++ fc c2 "<album>"
+ ++ " <composer> <date>"
+
mpdt light =
if light
- then "<ppos>/<plength> \
- \<fn=0><fc=darkolivegreen><title></fc></fn> \
- \<fn=0><fc=dodgerblue4><artist></fc> \
- \<fn=0><album></fn> \
- \<fc=burlywood4><composer></fc> <date></fn>"
- else "<ppos>/<plength> \
- \<fn=0><fc=darkseagreen4><title></fc></fn> \
- \<fn=0><fc=darkslategray4><artist></fc> \
- \<fn=0><fc=burlywood4><album></fc></fn> \
- \<composer> <date></fn>"
+ then mpdt' "darkolivegreen" "dodgerblue4" "burlywood4"
+ else mpdt' "darkseagreen4" "darkslategray4" "burlywood4"
autoMPD l lgt =
AutoMPD [ "-T", l, "-E", "…", "-W", "10", "-t", "<length> " ++ mpdt lgt]