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
|
import Xmobar
import Config
import Monitors
topProcL p = TopProc (p <~> args) 15
where template = "<both1> <both2> <both3> ยท <mboth1> <mboth2> <mboth3>"
args = ["-t", template, "-w", "12", "-L" , "10", "-H", "80"]
diskIOS p = DiskIO [("/", "<read> <write>")] (diskArgs p) 10
cpuFreq' p = CpuFreq (p <~> args) 50
where args = ["-t" , "<avg>" , "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"]
memory' = Memory args 20
where template = "<used> <available>"
args = ["-t", template , "-p", "2", "-d", "1", "--", "--scale", "1024"]
master p = Volume "default" "Master" (args ++ ("--":ext)) 10
where args = ["-t", "<status> <volume>"]
ext = ["-C", pForeground p, "-c", "sienna4", "-O", "๐", "-o", "๐"]
capture = Volume "default" "Capture" ["-t", "<volume>"] 10
batt0 p =
BatteryN ["BAT0"]
["-t", "<acstatus>"
, "-S", "Off", "-d", "0" -- , "-m", "2"
, "-L", "10", "-H", "90" -- , "-p", "2"
, "--low", pHigh p, "--normal", pNormal p, "--high", pLow p
, "-W", "0"
, "-f", "\129707\129707\129707๐๐๐๐๐๐๐โณ๏ธ"
, "--"
, "-P"
, "-a", "notify-send -u critical 'Battery running out!!!!!!'"
, "-A", "7"
, "-i", "๏ผ" -- "โณ๏ธ"
, "-o", "\129707 <left> <timeleft> <watts>"
, "-O", "๐" ++ " <left> <timeleft> <watts>"
-- , "-o", "<leftbar> <left> <timeleft> <watts>"
--, "-O", "<leftbar> <left> <timeleft> <watts>"
, "-H", "10", "-L", "7"
, "-h", pHigh p, "-l", pLow p] 50 "batt0"
weath st p =
WeatherX st
[ ("", "๐ก")
, ("clear", "๐")
, ("sunny", "๐")
, ("fair", "๐")
, ("mostly clear", "๐ค๏ธ")
, ("mostly sunny", "๐ค๏ธ")
, ("partly sunny", "โ
")
, ("obscured", "๐")
, ("fog", "๐ซ๏ธ")
, ("foggy", "๐ซ๏ธ")
, ("cloudy", "โ๏ธ")
, ("overcast", "โ๏ธ")
, ("partly cloudy", "โ
")
, ("mostly cloudy", "โ๏ธ")
, ("considerable cloudiness", "โ๏ธ")
, ("light rain", "๐ฆ๏ธ")
, ("rain", "๐จ๏ธ")
, ("ice crystals", "โ๏ธ")
, ("light snow", "๐จ๏ธ")
, ("snow", "โ๏ธ")
]
(mkArgs p ["-t", "<skyConditionS> <tempC>ยฐ <weather> ๐ซ <windKmh>"
, "-L", "10", "-H", "25" , "-T", "25", "-E", ".."]
["-w", ""])
18000
config p = (baseConfig p) {
position = TopSize C 100 22
, textOutput = True
, font = "Hack 10"
, commands = [ Run (topProcL p)
, Run (batt0 p)
, Run (cpu p)
, Run (cpuFreq' p)
, Run memory'
, Run (diskU p)
, Run (diskIOS p)
, Run (kbd p)
, Run (coreTemp p)
, Run (wireless p "wlan0")
, Run (dynNetwork p)
, Run (vpnMark "wg-mullvad")
, Run tun0
, Run (master p)
, Run capture
, Run laTime
, Run localTime
, Run (weath "EGPH" p)
, Run (NamedXPropertyLog "_EMACS_LOG" "elog")
]
, template = " |batt0| "
++ " ๐ง |wg-mullvad||tun0||wlan0wi|"
-- ++ " |wg-mullvad||tun0||wlan0wi|"
++ " |dynnetwork| "
++ " |default:Master| ๐๏ธ |default:Capture|"
++ " |EGPH|"
++ " |elog|"
++ "{*}"
++ "|kbd|"
++ " |cpufreq|"
++ " |multicpu|"
++ " |multicoretemp|"
++ " |top| "
++ " โ |memory| "
++ " |diskio| ๐ด |disku| "
++ " |datetime| "
++ "|laTime| "
}
main :: IO ()
main = palette >>= configFromArgs . config >>= xmobar
|