summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmobar/xmobar.hs
blob: 12132ae20e39f1708bfe6970189adc314dd2be69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Xmobar

import Data.List (intercalate)
  

main :: IO ()
main = xmobar config
  where
    config = defaultConfig
      { font             = "xft:FiraCode Nerd Font Mono:style=Regular:pixelsize=21"
      , position         = OnScreen 0 $ TopP 0 307
      , bgColor          = "black"
      , fgColor          = "#808080"
      , overrideRedirect = False
      , template =
          let left = intercalate " | "
                [ "%XMonadWorkspaces%"
                , "%XMonadLayout%"
                , "%XMonadTitle%"
                ]
              right = intercalate " | "
                [ {- "%status%"
                , -} "%battery%"
                , "%kbd%"
                , "%worktime%"
                , "%worktime-today%"
                , "%date%"
                ]
           in left <> "}{" <> right
      , commands =
          [ Run $ NamedXPropertyLog "_XMONAD_WORKSPACES" "XMonadWorkspaces"
          , Run $ NamedXPropertyLog "_XMONAD_LAYOUT" "XMonadLayout"
          , Run $ NamedXPropertyLog "_XMONAD_TITLE" "XMonadTitle"
          , Run $ Date "%a W%V %b %_d %H:%M:%S %Y %:::z" "date" 2 
          , Run $ Com "worktime" [] "worktime" 1500
          , Run $ Com "worktime" ["today"] "worktime-today" 1500
          , Run $ Com "ssh" ["status.odin"] "status" 600
          , Run $ Kbd [("us(dvp)", "dvp")]
          , Run $ Battery
            [ "--template", "<watts> <left> (<timeleft>) AC <acstatus>"
            , "--suffix", "On"
            , "--Low", "10"
            , "--High", "80"
            , "--low", "darkred"
            , "--normal", "darkorange"
            , "--high", "darkgreen"
            , "-p", "3"
            ] 50
          ]
      }