module Music where
import Xmobar
import Monitors
import qualified Bottom
import Config (defaultHeight, pIsLight)
import GMPDP (GMPDP(..))
mpris client width =
Mpris2 client -- "clementine" --
["-t", " \
\ \
\ "
, "-T", show width, "-E", "…", "-M", "100", "-x", ""] 10
mprisConfig client p = Bottom.config [Run (mpris client 165)] "|mpris2|" p
mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t"
, " "] 10 -- fn=5
mpdt light =
if light
then "/ \
\ \
\ \
\ \
\ "
else "/ \
\ \
\ \
\ \
\ "
autoMPD l lgt =
AutoMPD [ "-T", l, "-E", "…", "-W", "10", "-t", " " ++ mpdt lgt]
mpdConfig p =
(Bottom.config [Run mpd, Run (autoMPD "150" (pIsLight p))] "|mpd| |autompd|" p)
{
textOffsets = [defaultHeight - 7, defaultHeight - 6]
}
compMPD p = concatMonitor " " mpd (autoMPD "150" (pIsLight p))
alt x p = altMonitor (mpris x 165) (compMPD p)
gpmd = Run (GMPDP "gmpdp")
config cl p =
if cl == "mpd"
then mpdConfig p
else Bottom.config [Run (alt cl p)] "|mpris2_mpd_autompd|" p