diff options
Diffstat (limited to 'src/TopC.hs')
| -rw-r--r-- | src/TopC.hs | 40 | 
1 files changed, 24 insertions, 16 deletions
| diff --git a/src/TopC.hs b/src/TopC.hs index 12fb0de..3e5748a 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -18,56 +18,64 @@ pollMPD light =    MPD [ "-T", "120", "-W", "10", "-E", "…", "-t", tm, "--", "-p", "6600"] 20    where tm = " <remaining> " ++ mpdt light +-- mprisName = "MellowPlayer3" +mprisName = "spotifyd" +  musicPipe = PipeReader "/tmp/music" "musicpipe" -music light = toggleMonitor "/tmp/mpris.st" musicPipe (autoMPD light) +musicMPRIS p = mpris p mprisName 180 + +-- music light = toggleMonitor "/tmp/mpris.st" musicPipe (pollMPD light) +music p = toggleMonitor "/tmp/mpris.st" (musicMPRIS p) (pollMPD (pIsLight p))  -- <fn=1> 💡 </fn>  config p = (baseConfig p) {    position = TopSize C 100 (defaultHeight - 1)    , textOffset = defaultHeight - 8    , textOffsets = [defaultHeight - 9, defaultHeight - 9, -                   defaultHeight - 6, defaultHeight - 8] +                   defaultHeight - 6, defaultHeight - 8, +                   -1, defaultHeight - 8]    , border = FullB    , alpha = 255    , commands = [ Run (topProcL p)                 , Run m                 , Run (thinkTemp p) -               , Run (mail p) +--               , Run (mail p)                 , Run (cpuBars p)                 , Run memory                 , Run (diskU p)                 , Run (diskIOL p) -               , Run brightness' +--               , Run brightness'                 , Run kbd -               , Run (batt p) +               , Run (miniBatt p)                 , Run (wireless p "wlp1s0")                 , Run (dynNetwork p)                 , Run proton0                 , Run w -- LEGE, LEBL, KCV0 -               , Run masterVol +               , Run (masterVol p)                 , Run captureVol -               , Run laTime +--               , Run laTime                 , Run localTime                 ] -  , template = " |batt0| " -             ++ "|bright| " +  , template = " " +             ++ "|batt0| " +--             ++ "|bright| "               ++ "<action=`toggle-app.sh nm-applet`>|proton0||wlp1s0wi|</action> "               ++ "|dynnetwork| "               ++ "<action=`toggle-app.sh pasystray`>|default:Master| \                   \|default:Capture|</action> " -             ++ "<action=`toggle-pipe.sh /tmp/mpris.st`>|" ++ ma ++ "|</action>" -             ++ fn 1 " |kbd|" +             ++ "<action=`toggle-pipe.sh /tmp/mpris.st`>" ++ ma ++ "</action>" +             ++ " |kbd|"               ++ " {} " -             ++ "|mail|" -             ++ "|multicoretemp| " +--             ++ "|mail|"               ++ "|multicpu| " +             ++ "|multicoretemp| "               ++ " |top| "               ++ "|memory| "               ++ fc "grey60" "|diskio|" ++ " |disku| "               ++ " |EGPH| " -             ++ fn 2 "🕓  " ++ "|datetime| |laTime| " -  } where m = music (pIsLight p) -          ma = alias m +             ++ fni "\xf017  " ++ "|datetime| " +  } where m = music p +          ma = fc "grey40" (fni "\xf001 ") ++ "|" ++ alias m ++ "|"            w = (weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p)  main :: IO () | 
