diff options
| author | jao <jao@gnu.org> | 2019-10-12 15:36:36 +0100 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2019-10-12 15:36:36 +0100 | 
| commit | 738df74921f796f4cc396b6d58de7c6b426ae6f3 (patch) | |
| tree | 2ab09c11e4d56d7775a3e0701bdea3ef1584f9f0 /src/TopC.hs | |
| parent | 62e159018a736787d94e0effc9ccb8c8b92b7546 (diff) | |
| download | xmobar-config-738df74921f796f4cc396b6d58de7c6b426ae6f3.tar.gz xmobar-config-738df74921f796f4cc396b6d58de7c6b426ae6f3.tar.bz2 | |
xmobar-exwm with a toggled music monitor
Diffstat (limited to 'src/TopC.hs')
| -rw-r--r-- | src/TopC.hs | 32 | 
1 files changed, 25 insertions, 7 deletions
| diff --git a/src/TopC.hs b/src/TopC.hs index fa75f75..a86c542 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -1,6 +1,23 @@  import Xmobar  import Config  import Monitors +import Music (mpris) + +topProcL p = TopProc (p <~> ["-t" , "<both1>  <mboth1>" +                            , "-w", "10", "-L" , "10", "-H", "80"]) 15 +diskIOL p = DiskIO [("nvme0n1p2", "<total>")] (diskArgs p) 10 + +mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t", " <remaining>"] 10 + +autoMPD = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" +                  , "<ppos>/<plength> \ +                    \<fn=0><fc=darkolivegreen><title></fc></fn> \ +                    \<fn=0><album></fn> \ +                    \<fn=0><fc=dodgerblue4><artist></fc> \ +                    \<fc=burlywood4><composer></fc> <date></fn>"] + +compMPD = concatMonitor " " mpd autoMPD +music = toggleMonitor "/tmp/mpris.st" (mpris "spotify") compMPD  -- <fn=1> 💡 </fn>  config p = (baseConfig p) { @@ -8,15 +25,14 @@ config p = (baseConfig p) {    , textOffset = defaultHeight - 8    , textOffsets = [defaultHeight - 9, defaultHeight - 9,                     defaultHeight - 6, defaultHeight - 8] -  , iconOffset = 10    , border = BottomB    , alpha = 255 -  , commands = [ Run (topProc' p) +  , commands = [ Run (topProcL p) +               , Run music                 , Run (cpuBars p)                 , Run memory                 , Run (diskU p) -               , Run (diskIO p) -               -- , Run (coreTemp p) +               , Run (diskIOL p)                 , Run brightness'                 , Run kbd                 , Run (batt p) @@ -36,9 +52,11 @@ config p = (baseConfig p) {                 \ <action=`toggle-app.sh blueman-tray`></action>\                 \<action=`toggle-app.sh pasystray`>|default:Master|\                 \ |default:Capture|</action>  |EGPH|\ -               \ |mail| <fn=1>|kbd|</fn>{} \ -               \  |top| |multicpu|\ -               \   |diskio| |disku| |memory| \ +               \ |mail| <fn=1>|kbd|</fn>{}\ +               \ <action=`toggle-pipe.sh /tmp/mpris.st`>|" ++ (alias music) ++ +               "|</action>\ +               \ |multicpu|  |top| |memory|\ +               \ |diskio| |disku| \                 \ <fn=2>🕓  </fn>|datetime| |laTime| "  } | 
