diff options
author | jao <jao@gnu.org> | 2021-01-07 00:42:14 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-01-07 00:42:14 +0000 |
commit | 09d127829ce503d638231f416c4f516b2dc31c04 (patch) | |
tree | 6552786bbbfe281b5b81381c8122ae36b3f930ff | |
parent | b8ea40877439321132e67a6a785f3e1700be2c9c (diff) | |
download | xmobar-config-09d127829ce503d638231f416c4f516b2dc31c04.tar.gz xmobar-config-09d127829ce503d638231f416c4f516b2dc31c04.tar.bz2 |
music monitors
-rw-r--r-- | src/TopC.hs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/TopC.hs b/src/TopC.hs index 61940d9..c14a965 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -10,8 +10,8 @@ topProcL p = TopProc (p <~> ["-t" diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")] (diskArgs p) 10 -mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t", " <remaining>"] 10 - +mpd a p t = + MPDX [ "-W", "12", "-b", "░", "-f", "▒", "-t", t, "--", "-p", p] 20 a autoMPD light = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" , @@ -19,13 +19,12 @@ autoMPD light = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" , " <lapsed>/<length> <ppos>/<plength>" -- ++ mpdt light ] -pollMPD light = - MPD [ "-T", "120", "-W", "10", "-E", "…", "-t", tm, "--", "-p", "6600"] 20 +pollMPD port light = + MPD [ "-T", "120", "-W", "10", "-E", "…", "-t", tm, "--", "-p", port] 20 where tm = fc "grey40" (fni "\xf001") ++ " <remaining> <length> " -- ++ "<ppos>/<plength>" -- ++ mpdt light --- mprisName = "MellowPlayer3" mprisName = "spotifyd" musicPipe = PipeReader "/tmp/music" "musicpipe" @@ -33,7 +32,10 @@ musicMPRIS p = mpris p mprisName 180 -- music light = toggleMonitor "/tmp/mpris.st" musicPipe (pollMPD light) -- music p = toggleMonitor "/tmp/mpris.st" (pollMPD (pIsLight p)) (musicMPRIS p) -music = pollMPD . pIsLight +-- music port = pollMPD port . pIsLight +music = concatMonitor (fni " \xf1bc ") + (mpd "mpd" "6600" "<remaining>") + (mpd "mopidy" "6669" "<ppos>/<plength> <remaining>") config p = (baseConfig p) { position = TopSize C 100 (defaultHeight - 1) @@ -84,8 +86,8 @@ config p = (baseConfig p) { ++ fni "\xf017" ++ " |datetime| " ++ "|laTime| " } where dimi = fc (pDim p) . fni - m = music p - ma = " |" ++ alias m ++ "| " + m = music + ma = dimi "\xf001" ++ " |" ++ alias m ++ "| " w = (weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p) main :: IO () |