diff options
| author | jao <jao@gnu.org> | 2019-12-05 01:16:59 +0000 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2019-12-05 01:18:20 +0000 | 
| commit | 318ce5d54950aea41bb2f3bfce73658a03bc691a (patch) | |
| tree | bd0b72a721ab80aa3851fd255d3ec3a7bcacdee8 | |
| parent | 413dde1f9a12da0449cd4356f3ff7566cd812ec9 (diff) | |
| download | xmobar-config-318ce5d54950aea41bb2f3bfce73658a03bc691a.tar.gz xmobar-config-318ce5d54950aea41bb2f3bfce73658a03bc691a.tar.bz2 | |
little tweaks for xmobar-exwm
| -rw-r--r-- | src/TopC.hs | 56 | ||||
| -rw-r--r-- | src/lib/Config.hs | 2 | ||||
| -rw-r--r-- | src/lib/Monitors.hs | 9 | ||||
| -rw-r--r-- | src/lib/Music.hs | 3 | 
4 files changed, 42 insertions, 28 deletions
| diff --git a/src/TopC.hs b/src/TopC.hs index 45d2453..b4b4afa 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -1,31 +1,41 @@  import Xmobar  import Config  import Monitors -import Music (mpris) +import Music (mpris, gpmd) -topProcL p = TopProc (p <~> ["-t" , "<both1>  <mboth1>" +topProcL p = TopProc (p <~> ["-t" , "<both1> <both2>  <mboth1> <mboth2>"                              , "-w", "10", "-L" , "10", "-H", "80"]) 15 -diskIOL p = DiskIO [("/", "<totalbvbar>"), ("/home", "<totalbvbar>")] +diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")]                     (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>"] +mpdt light = +  if light +  then "<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>" +  else "<ppos>/<plength> \ +       \<fn=0><title></fn> \ +       \<fn=0><fc=darkseagreen><album></fc></fn> \ +       \<fn=0><fc=darkseagreen4><artist></fc> \ +       \<fc=burlywood4><composer></fc> <date></fn>" -autoMPDD = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" -                   , "<ppos>/<plength> \ -                     \<fn=0><title></fn> \ -                     \<fn=0><fc=darkseagreen><album></fc></fn> \ -                     \<fn=0><fc=darkseagreen4><artist></fc> \ -                     \<fc=burlywood4><composer></fc> <date></fn>"] +autoMPD light = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" , mpdt light] -compMPD light = concatMonitor " " mpd (if light then autoMPD else autoMPDD) -music light = toggleMonitor "/tmp/mpris.st" (mpris "spotify" 120) (compMPD light) +ompd light = +  MPD [ "-T", "120", "-W", "10", "-E", "…", "-t", tm, "--", "-p", "6669"] 20 +  where tm = " <remaining> " ++ mpdt light + +compMPD light = concatMonitor " " mpd (autoMPD light) +mpn = "spotify" +-- mpn = "google_play_music_desktop_player" +-- music light = toggleMonitor "/tmp/mpris.st" (mpris mpn 120) (compMPD light) +-- music light = toggleMonitor "/tmp/mpris.st" gpmd (compMPD light) +music light = toggleMonitor "/tmp/mpris.st" (compMPD light) (ompd light) +-- music light = ompd light  -- <fn=1> 💡 </fn>  config p = (baseConfig p) { @@ -43,27 +53,27 @@ config p = (baseConfig p) {                 , Run (diskIOL p)                 , Run brightness'                 , Run kbd -               , Run (batt p) +               -- , Run (batt p)                 , Run (wireless p "wlp1s0")                 , Run (dynNetwork p)                 , Run tun0 -               , Run (weather "EGPH" p) -- LEGE, LEBL, KCV0 -               , Run (mail p) +               , Run (weather' "<skyConditionS> <tempC>°" "EGPH" p) -- LEGE, LEBL, KCV0 +               -- , Run (mail p)                 , Run masterVol                 , Run captureVol                 , Run laTime                 , Run localTime                 ] -  , template = " |batt0| |bright|\ +  , template = " |bright|\                 \ <action=`toggle-app.sh nm-applet`>|tun0||wlp1s0wi|</action> \                 \ |dynnetwork| \                 \ <action=`toggle-app.sh pasystray`>|default:Master|\                 \ |default:Capture|</action>  |EGPH|\ -               \|mail|<fn=1>|kbd|</fn>{}\ +               \<fn=1>|kbd|</fn>{}\                 \ <action=`toggle-pipe.sh /tmp/mpris.st`>|" ++ (alias m) ++                 "|</action>\                 \ |multicpu|  |top| |memory|\ -               \ |diskio| |disku| \ +               \ <fc=grey60>|diskio|</fc> |disku| \                 \ <fn=2>🕓  </fn>|datetime| |laTime| "    } where m = music (pIsLight p) diff --git a/src/lib/Config.hs b/src/lib/Config.hs index 119a4e5..a8a8dc1 100644 --- a/src/lib/Config.hs +++ b/src/lib/Config.hs @@ -42,7 +42,7 @@ lightPalette = Palette { pNormal = "black"  zenburnRed = "#CC9393"  zenburnBack = "#2B2B2B"  zenburnBackLight = "#383838" -zenburnFg = "#DCDCCC" +zenburnFg = "#989890" -- "#DCDCCC"  zenburnYl = "#F0DFAF"  zenburnGreen = "#7F9F7F" diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs index daa59b7..d589ce1 100644 --- a/src/lib/Monitors.hs +++ b/src/lib/Monitors.hs @@ -76,7 +76,7 @@ uptime p = Uptime (p <~> [ "-t" , "<days> <hours>", "-m", "3", "-c", "0", "-S"                           , "On" , "-L", "10", "-H", "100"]) 600  -- 🌧 -weather st p = +weather' tmp st p =    WeatherX st             [ ("", "<fc=gray60><fn=4>🌑</fn></fc>")             , ("clear", "<fn=4>🌣</fn>") @@ -91,10 +91,11 @@ weather st p =             , ("partly cloudy", "<fn=3>⛅</fn>")             , ("mostly cloudy", "<fn=3>☁</fn>")             , ("considerable cloudiness", "<fn=4>⛈</fn>")] -           (p <~> ["-t", "<skyConditionS> <tempC>° <rh>% <windKmh> (<hour>)" -                  , "-L","10", "-H", "25"]) +           (p <~> ["-t", tmp , "-L","10", "-H", "25"])             18000 +weather = weather' "<skyConditionS> <tempC>° <rh>% <windKmh> (<hour>)" +  batt p =    BatteryN ["BAT0"]             ["-t", "<acstatus> <left>" @@ -125,7 +126,7 @@ diskU p =          20  diskArgs p = mkArgs p -                ["-f", "░", "-b", " ", "-L", "200000", "-H" , "10000000" +                ["-f", "░", "-b", " ", "-L", "10000000", "-H" , "100000000"                  , "-W", "5", "-w", "5", "-p", "3"]                  ["--total-icon-pattern", "<icon=load_%%.xpm/>"] diff --git a/src/lib/Music.hs b/src/lib/Music.hs index 304a1fc..0fdb87c 100644 --- a/src/lib/Music.hs +++ b/src/lib/Music.hs @@ -4,6 +4,7 @@ import Xmobar  import Monitors  import qualified Bottom  import Config (defaultHeight) +import GMPDP (GMPDP(..))  mpris client width =    Mpris2 client -- "clementine" -- @@ -33,6 +34,8 @@ mpdConfig p = (Bottom.config [Run mpd, Run (autoMPD "150")] "|mpd| |autompd|" p)  compMPD = concatMonitor " " mpd (autoMPD "150")  alt x = altMonitor (mpris x 165) compMPD +gpmd = Run (GMPDP "gmpdp") +  config cl =    if cl == "mpd"    then mpdConfig | 
