summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmobar/xmobar.hs
blob: 74ce7347e2392a8b1d6e8b76205b35ffff498f73 (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
51
52
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%"
                , "%time%"
                , "%date%"
                ]
           in left <> "}{" <> right
      , commands =
          [ Run $ NamedXPropertyLog "_XMONAD_WORKSPACES" "XMonadWorkspaces"
          , Run $ NamedXPropertyLog "_XMONAD_LAYOUT" "XMonadLayout"
          , Run $ NamedXPropertyLog "_XMONAD_TITLE" "XMonadTitle"
          , Run $ Date "%H:%M" "time" 50
          , Run $ Date "%a %b %_d" "date" 50
          , 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
          ]
      }