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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
import Xmobar
green, red, blue, blue2, aqua, purple, yellow, orange, lowWhite, white :: String
green = "#b8bb26"
red = "#fb4934"
blue = "#83a598"
blue2 = "#458588"
purple = "#d3869b"
yellow = "#fabd2f"
orange = "#fe8019"
aqua = "#8ec07c"
lowWhite = "#a89984"
white = "#ebdbb2"
config :: Config
config =
defaultConfig
{ overrideRedirect = False
, font = "xft:JetBrains Mono NF Medium-10"
, bgColor = "#282828"
, fgColor = "#ebdbb2"
, position = Static { xpos=0, ypos=0, width=2256, height=23 }
, commands = [ Run $ Cpu ["--template", "\63521 <total>%"
, "-L", "30"
, "-H", "70"
, "--high", red
, "--normal", yellow
] 10
, Run $ CoreTemp [ "--template" , "\63687 <core0>°C"
, "--Low" , "50" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , aqua
, "--normal" , orange
, "--high" , red
] 20
, Run $ Alsa "default" "Master"
[ "--template", "墳 <volume><status>"
, "--suffix", "True"
, "--"
, "--on", ""
, "--off", "/mute"
, "-c", red
]
, Run $ Memory ["--template", "\57958 <usedratio>%"
, "--High", "60"
, "--high", orange
] 10
, Run $ Swap ["--template", concat ["<fc=", lowWhite, ">[<usedratio>%]</fc>"]
, "--High", "0"
, "--high", orange
] 10
, Run $ Date (concat ["\62956 <fc=", purple, ">%a</fc> %D <fc=", blue2, ">%I:%M %p</fc>"]) "date" 10
, Run $ DynNetwork [ "--template", (concat ["\62722 <dev>: <tx>kB<fc=", lowWhite, ">tx</fc> <rx><fc=", white, ">kB</fc><fc=", lowWhite, ">rx</fc>"])
, "--Low", "5000" -- units: B/s
, "--High", "100000" -- units: B/s
, "--low", green
, "--normal", orange
, "--high", red
] 10
, Run $ Battery [ "--template", "\62840 <acstatus>"
, "--Low", "20" -- units: %
, "--High", "80" -- units: %
, "--low", red
, "--normal", green
, "--high", blue
, "--" -- battery specific options
-- discharging status
, "-o", "<left>% (<timeleft>)"
-- AC "on" status
, "-O", "<fc=#dAA520>+<left>%</fc>"
-- charged status
, "-i", "<fc=#006000>Charged</fc>"
] 50
, Run $ Com "brightness" [] "" 10
, Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = " %XMonadLog% }{%alsa:default:Master%|\62941 %brightness%|%battery%|%dynnetwork%|%cpu%|%coretemp%|%memory%%swap%|%date% "
}
main :: IO()
main = xmobar config
|