diff options
| author | jao <jao@gnu.org> | 2018-12-22 02:50:31 +0000 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2018-12-22 02:50:31 +0000 | 
| commit | 80c57d09cab1eaedc09b85d7c21e629e3a6a796f (patch) | |
| tree | 8832d47a418a89be1977da05a4011f41d1c73bba /src/lib | |
| parent | ecaa36aeb057cad86766b9ce537d0977e98f59e2 (diff) | |
| download | xmobar-config-80c57d09cab1eaedc09b85d7c21e629e3a6a796f.tar.gz xmobar-config-80c57d09cab1eaedc09b85d7c21e629e3a6a796f.tar.bz2 | |
trayer support and refactorings
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Bottom.hs | 8 | ||||
| -rw-r--r-- | src/lib/Config.hs | 15 | ||||
| -rw-r--r-- | src/lib/MPD.hs | 10 | ||||
| -rw-r--r-- | src/lib/Mpris.hs | 8 | 
4 files changed, 19 insertions, 22 deletions
| diff --git a/src/lib/Bottom.hs b/src/lib/Bottom.hs index 34ce86a..087ba97 100644 --- a/src/lib/Bottom.hs +++ b/src/lib/Bottom.hs @@ -64,14 +64,20 @@ brightness = Brightness ["--", "-D", "intel_backlight"] 10  memory = Memory ["-t","<available> M", "-p", "2"] 20 -config cs p = (baseConfig p) { +config cs tpl p = (baseConfig p) {    position = BottomSize C 100 defaultHeight    , textOffset = defaultHeight - 6    , textOffsets = [defaultHeight - 5]    , border = TopB +  , template = "|tray||kbd||default:Master| |default:Capture| " +             ++ tpl +             ++ " {} |mbox| |EGPH| \ +                \|diskio| |disku| · |bright| · |coretemp| \ +                \|memory| · |uptime| |b0| "    , commands = [ Run (uptime p)                 , Run brightness                 , Run (weather "EGPH") -- LEGE, LEBL, KCV0 +               , Run (Com "padding-icon.sh" [] "tray" 20)                 , Run memory                 , Run (batt p)                 , Run (coreTemp p) diff --git a/src/lib/Config.hs b/src/lib/Config.hs index 4b4f160..abdfb22 100644 --- a/src/lib/Config.hs +++ b/src/lib/Config.hs @@ -32,14 +32,15 @@ lightPalette = Palette { pNormal = "black"                         }  darkPalette :: Palette -darkPalette = Palette { pNormal = "black" -                      , pLow = "#4d4d4d" +darkPalette = Palette { pNormal = "grey60" +                      , pLow = "gray50"                        , pHigh = "#a0522d" -                      , pFont = "xft:NotoMono-9,xft:Inconsolata-11" -                      , pBorder = "black" -                      , pForeground = "grey50" +                      , pFont = "xft:Source Code Pro Medium-10" +                      -- , pFont = "xft:NotoMono-9,xft:Inconsolata-11" +                      , pBorder = "grey30" +                      , pForeground = "grey60"                        , pBackground = "black" -                      , pAlpha = 102 +                      , pAlpha = 0                        }  palette :: IO Palette @@ -58,7 +59,7 @@ baseConfig p = defaultConfig {    , alpha = (pAlpha p)    , additionalFonts = []    , overrideRedirect = True -  , lowerOnStart = False +  , lowerOnStart = True    , hideOnStart = False    , allDesktops = True    , persistent = True diff --git a/src/lib/MPD.hs b/src/lib/MPD.hs index da0f954..3a30699 100644 --- a/src/lib/MPD.hs +++ b/src/lib/MPD.hs @@ -15,12 +15,8 @@ autoMPD = AutoMPD [ "-T", "160", "-E", "...", "-W", "10", "-t"                      \<fc=burlywood4><composer></fc> <date></fn>"] -config p = (Bottom.config [(Run mpd), (Run autoMPD)] p) { -  template =  "|kbd||default:Master| |default:Capture| \ -              \|mpd| |autompd| {} |mbox| \ -              \|EGPH| \ -              \|diskio| |disku| · |bright| · |coretemp| \ -              \|memory| · |uptime| |b0| " -  , additionalFonts = ["xft:Hack-7"] +config p = (Bottom.config [Run mpd, Run autoMPD] "|mpd| |autompd|" p) +  { +    additionalFonts = ["xft:Hack-7"]    , textOffsets = [defaultHeight - 7]    } diff --git a/src/lib/Mpris.hs b/src/lib/Mpris.hs index 1936d57..4ae98d1 100644 --- a/src/lib/Mpris.hs +++ b/src/lib/Mpris.hs @@ -11,10 +11,4 @@ mpris client =                  \ <album> <length>"           , "-T", "180", "-E", "...", "-M", "100", "-x", ""] 10 -config client p = (Bottom.config [Run (mpris client)] p) { -  template =  "|kbd||default:Master| |default:Capture| \ -              \|mpris2| {} |mbox| \ -              \|EGPH| \ -              \|diskio| |disku| · |bright| · |coretemp| \ -              \|memory| · |uptime| |b0| " -  } +config client p = Bottom.config [Run (mpris client)] "|mpris2|" p | 
