-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmobarrc-main-oldCPU.hs
190 lines (168 loc) · 10.1 KB
/
xmobarrc-main-oldCPU.hs
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
Config {
-- appearance
bgColor = "#181715"
, fgColor = "#646464"
--, position = Bottom
-- font = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*"
-- font = "-*-*-*-*-*-*-12-*-*-*-*-*-*-*"
--, font = "Monospace Extra-Light Thin 8" -- Need this change because xmobar now use pango insteed of xft
--, font = "Monospace Thin Thin 8" -- Need this change because xmobar now use pango insteed of xft
, font = "Monospace Bold 9" -- Need this change because xmobar now use pango insteed of xft
--, font = "Monospace Regular 9" -- Need this change because xmobar now use pango insteed of xft
--, font = "Ubuntu Mono derivative Powerline 10" -- Need this change because xmobar now use pango insteed of xft
--, font = "xft:JetBrainsMono Nerd Font Mono-10"
--, font = "xft:Fira Mono for Powerline:style=Bold-10"
--, font = "xft:Fira Mono for Powerline:style=Bold:size=9"
--, font = "xft:Fira Mono for Powerline:style=Bold-9"
--, font = "Fira Mono for Powerline Bold 10" -- this format is working great
--, font = "JetBrainsMono Nerd Font Mono 9"
--, font = "JetBrainsMono Nerd Font Mono Bold 9"
--, textOffset = 13
, border = TopB
, borderColor = "#181715"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
--, template = " %StdinReader% }{ %dynnetwork% %memory% %multicpu% %coretemp% %battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %dynnetwork% %memory% %multicpu% %coretemp% %battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %dynnetwork% %diskio% %memory% %multicpu% %coretemp% %battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %dynnetwork% %diskio%%memory% %multicpu% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %dynnetwork% %diskio% %memory% %multicpu% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %dynnetwork% %memory% %multicpu% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% "
, template = " %StdinReader% }{ %NetConnStatus% %memory% %multicpu% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% " -- 2024-12-05 backup before test MultiCoreTemp
--, template = " %StdinReader% }{ %NetConnStatus% %multicpu%,%multicoretemp% %memory% %default:Master%%battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %NetConnStatus% %multicpu% %memory% %default:Master%%battery% %keylock% %kbd% %date% " -- error on zahrah; ok on khadijah, taufiq
--, template = " %StdinReader% }{ %NetConnStatus% %memory% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %dynnetwork% %memory% %multicpu% %coretemp% %default:Master%%battery% %keylock% %kbd% %date% "
--, template = " %StdinReader% }{ %dynnetwork% %memory% %multicpu% %coretemp% %battery% %keylock% %date% "
--, template = " %StdinReader% }{ %dynnetwork% %memory% %multicpu% %coretemp% %battery% %kbd% %date% "
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
--, useAnsi = False -- Disable ANSI escape code rendering. This is the default.
--, useAnsi = True -- enable ANSI escape code rendering
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands = [
-- StdinReader will read the output generated by xmonad (workspace info)
Run StdinReader
-- network activity monitor for ethernet
--, Run Network "eno1" [
-- , Run DynNetwork [
-- --, "-S", "True"
-- "--template" , "<dev>:Rx<rx>kb/s,Tx<tx>kb/s"
-- --"--template" , "<dev>:Rx<rx>kbps,Tx<tx>kbps"
-- --, "--Low" , "300000000" -- in B/s (100% dari 300Mb/s; kelajuan internet sekarang ialah 300Mbps ???)
-- --, "--High" , "1000000000" -- in B/s (100% dari 1Gb/s; kelajuan ethernet/LAN network kita ialah 1GBps)
-- , "--Low" , "240000000" -- in B/s (80% dari 300Mb/s; kelajuan internet sekarang ialah 300Mbps ???)
-- , "--High" , "800000000" -- in B/s (80% dari 1Gb/s; kelajuan ethernet/LAN network kita ialah 1GBps)
-- , "--low" , "#649FB6" -- color below '--low' cutoff
-- , "--normal" , "darkorange" -- color between '--low' and '--high' cutoff
-- , "--high" , "darkred" -- color above '--high' cutoff
-- ] 10
--
-- Note:
--
-- 1 Giga bits per second
-- = 1 Gbits/s
-- = 1,000 mega bits per second
-- = 1,000 Mbits/s
-- = 1,000,000 kilo bits per second
-- = 1,000,000,000 bits per second
--
-- 1 Mbps = 1000 kbps
--
-- Internet Download speed = 300 Mbps
-- = 300 * 1000 kbps
-- = 300 000 kbps
--
-- 80% from internet download speed = (80 / 100) * 300 000 kbps
-- = 240 000 kpbs
-- = 240 Mbps
--
-- Lan speed = 1 Gbps
-- = 1000 Mbps
-- = 1 000 000 kbps
--
-- 80% from LAN speed = (80/100) * 1000 Mbps
-- = 800 Mbps
-- = 800 000 kbps
--, Run Memory [ "--template" , "Mem:<usedratio>%(<cache>M)" ] 10
--, Run Memory [ "--template" , "Mem:<usedratio>%" ] 10
, Run Memory [ "--template" , "Mem:<usedratio>%" ] 25
--, Run DiskIO [("sda", "<read><write>")] [] 10
--, Run DiskIO [
-- --("sda", "sdaIO:R<read>,W<write>")
-- --, ("sdb", "sdbIO:R<read>,W<write>")
-- ("/", "/:R<read>,W<write>")
-- ] [] 10
--, Run DiskIO [("sda", "DiskIO:<total>")] [] 10
--, Run MultiCpu [ "--template" , "Cpu:<total>%" ] 10
, Run MultiCpu [ "--template" , "Cpu:<total>%" ] 25
-- cpu core temperature monitor
-- , Run CoreTemp [ "--template" , "Temp:<core0>°C,<core1>°C"
, Run CoreTemp [ "--template" , "Temp:<core0>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 50
--, Run MultiCoreTemp ["-t", "Temp: <avg>°C | <avgpc>%",
--, Run MultiCoreTemp [ "-t", "<avg>°C"
-- , "-L", "60", "-H", "80"
-- , "-l", "green", "-n", "yellow", "-h", "red"
-- --, "--", "--mintemp", "20", "--maxtemp", "100"
-- ] 50
-- time and date indicator
, Run Date "<fc=#ffff00>%A</fc> <fc=#00ff00>%F</fc> <fc=#00ffff>%T</fc>" "date" 10
, Run Volume "default" "Master" [ "--template", "Vol:<volume>%<status>" ] 10
-- keyboard layout indicator
, Run Kbd [
("us(dvorak)" , "<fc=#181715,#58C5F1> DV </fc>"),
("us" , "<fc=#181715,#58C5F1> US </fc>"),
("ara" , "<fc=#181715,#58C5F1>ARA </fc>"),
("my" , "<fc=#181715,#58C5F1> MY </fc>"),
("msa" , "<fc=#181715,#58C5F1>MSA </fc>"),
("msa(najib)" , "<fc=#181715,#58C5F1>MSA2</fc>"),
("msa(macnajib)" , "<fc=#181715,#58C5F1>MSA3</fc>")
]
-- battery monitor
, Run Battery [ "--template" , "Batt:<acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "darkred"
, "--normal" , "darkorange"
, "--high" , "darkgreen"
, "--" -- battery specific options
-- discharging status
, "-o" , "<left>% (<timeleft>)"
-- AC "on" status
, "-O" , "<fc=#dAA520>Charging</fc>"
-- charged status
, "-i" , "<fc=#006000>Charged</fc>"
] 50
-- keyboard LED status
, Run CommandReader "~/.xmonad/bin/keyboard-LED-status.sh" "keylock"
-- Network connection status
--, Run CommandReader "~/.xmonad/netconnstatus.sh" "NetConnStatus"
, Run CommandReader "~/.xmonad/bin/netconnstatus.sh" "NetConnStatus"
--, Run Weather "RJTT" [ "--template", "<skyCondition>,<fc=#4682B4><tempC></fc>°C,<fc=#4682B4><rh></fc>%,<fc=#4682B4><pressure></fc>hPa" ] 36000
]
}