diff options
author | jao <jao@gnu.org> | 2020-02-01 04:33:16 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-02-01 04:33:16 +0000 |
commit | f64764b95e9e713157bdb96a377c636479bfc40c (patch) | |
tree | b451429ba81391f66961bb54e7ead1c54f430bcc /src/lib/Music.hs | |
parent | b9f23c8d2189352b409a461c065d635ecab3e893 (diff) | |
download | xmobar-config-f64764b95e9e713157bdb96a377c636479bfc40c.tar.gz xmobar-config-f64764b95e9e713157bdb96a377c636479bfc40c.tar.bz2 |
fn, fc
Diffstat (limited to 'src/lib/Music.hs')
-rw-r--r-- | src/lib/Music.hs | 23 |
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] |