summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmobar/xmobar.hs
blob: 322b4449ac3fe31bbe22833e3f5be8c7eb2e7c66 (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
53
54
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%"
                , "%weekdate%"
                , "%time%"
                ]
           in left <> "}{" <> right
      , commands =
          [ Run $ NamedXPropertyLog "_XMONAD_WORKSPACES" "XMonadWorkspaces"
          , Run $ NamedXPropertyLog "_XMONAD_LAYOUT" "XMonadLayout"
          , Run $ NamedXPropertyLog "_XMONAD_TITLE" "XMonadTitle"
          , Run $ Date "%Y-%m-%d" "date" 500
          , Run $ Date "W%V-%u" "weekdate" 500
          , Run $ Date "%H:%M:%S%Ez" "time" 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
          ]
      }