11import Xmobar
22import AConfig (getConfig , AConfig (.. ))
33
4+ -- fcClr :: [Char] -> [Char] -> [Char]
5+ -- fcClr clr str = "<fc="++clr++">"++str++"</fc>"
6+
7+ cmds :: AConfig -> [Runnable ]
8+ cmds cnf =
9+ [ Run $ Network " wlp58s0"
10+ [" -L" ," 0" ," -H" ," 32000" , " -m" , " 3" ,
11+ " --normal" ,cl_grey cnf," --high" ,cl_red cnf,
12+ " -t" , " <rx>KB /<tx>KB" ] 50
13+ , Run $ MultiCpu
14+ [" --low" , cl_aqua cnf, " --normal" , cl_grey cnf," --high" ,cl_red cnf,
15+ " -t" , " <total>%" ] 50
16+ , Run $ Memory
17+ [ " --normal" ,cl_grey cnf," --high" ,cl_red cnf,
18+ " -m" , " 2" , " -L" , " 0" , " -H" , " 90" ,
19+ " -t" ," <usedratio>%" ] 50
20+ , Run $ Date " %a %b %_d %H:%M" " date" 600
21+ , Run $ Alsa " default" " Master"
22+ [ " --low" , cl_aqua cnf, " --normal" ,cl_grey cnf," --high" ,cl_red cnf,
23+ " -t" , " <volume>%" ]
24+ , Run $ MultiCoreTemp
25+ [" --low" , cl_aqua cnf, " --normal" ,cl_grey cnf," --high" ,cl_red cnf,
26+ " -t" , " <avg>°C" ] 50
27+ , Run $ UnsafeStdinReader
28+ , Run $ BatteryP [" BAT0" ]
29+ [" -t" , " <acstatus><left>% <timeleft> <watts>" ,
30+ " -L" , " 10" , " -H" , " 80" , " -p" , " 3" ,
31+ " --" ,
32+ " -O" , " \xf58e " , " -o" , " \xf58b " , " -i" , " " ,
33+ " -L" , " -20" , " -H" , " -10" ,
34+ " -l" , cl_grey cnf, " -m" , cl_aqua cnf, " -h" , cl_red cnf, " -p" , cl_green cnf,
35+ " -a" , " notify-send -u critical 'Battery running out!!'" ,
36+ " -A" , " 3" ]
37+ 100
38+ ]
39+
440config :: AConfig -> Config
541config cnf =
642 Config { verbose = False
743 , wmClass = " xmobar"
844 , wmName = " xmobar"
945 , border = NoBorder
10- , borderColor = " #BFBFBF "
46+ , borderColor = cl_orange cnf
1147 , borderWidth = 1
1248 , textOffsets = []
1349 , font = cl_font cnf
@@ -23,24 +59,14 @@ config cnf =
2359 , pickBroadest = False
2460 , persistent = False
2561 , hideOnStart = False
26- , iconRoot = cl_iconRoot cnf
62+ , iconRoot = " "
2763 , allDesktops = True
2864 , overrideRedirect = True
29- , commands = [ Run $ Network " enp0s31f6" [" -L" ," 0" ," -H" ," 32000" , " -m" , " 3" , " --normal" ,cl_aqua cnf," --high" ,cl_red cnf, " -t" , " <rx>KB|<tx>KB" ] 50
30- , Run $ MultiCpu [ " --low" , cl_aqua cnf, " --normal" ,cl_aqua cnf," --high" ,cl_red cnf, " -t" , " <total>%" ] 50
31- , Run $ Memory [" -t" ," <usedratio>%" , " -L" , " 0" , " -H" , " 90" , " --normal" ,cl_aqua cnf," --high" ,cl_red cnf, " -m" , " 2" ] 50
32- , Run $ Date " %a %b %_d %H:%M" " date" 600
33- , Run $ Alsa " default" " Master" [" -t" , " <volume>%" , " --low" , cl_aqua cnf, " --normal" ,cl_aqua cnf," --high" ,cl_red cnf]
34- , Run $ Com " nvidia-settings" [" -t" ," -q" ," [gpu:0]/GPUCoreTemp" ] " gputemp" 50
35- , Run $ MultiCoreTemp [ " --low" , cl_aqua cnf, " --normal" ,cl_aqua cnf," --high" ,cl_red cnf, " -t" , " <avg>°C" ] 50
36- , Run $ CatInt 0 " /sys/devices/platform/nct6775.2592/hwmon/hwmon3/fan2_input" [
37- " -L" , " 0" , " -H" , " 1082" , " --normal" ,cl_aqua cnf," --high" ,cl_red cnf] 50
38- , Run $ UnsafeStdinReader
39- ]
65+ , commands = cmds cnf
4066 , sepChar = " %"
4167 , alignSep = " }{"
4268 , template = " %UnsafeStdinReader%}\
43- \{<icon=volume.xpm/> %alsa:default:Master% | %enp0s31f6 % | <icon=memory.xpm/> %memory% | <icon=cpu.xpm/> %multicpu% %multicoretemp% %cat0% | <icon=gpu.xpm/> %gputemp%°C | <fc= " ++ cl_lilly cnf ++ " >% date%</fc> "
69+ \{奔 %alsa:default:Master% | ﯱ %wlp58s0 % | %battery% | \xf85a %memory% | \xfb19 %multicpu% %multicoretemp% | % date%"
4470 }
4571
4672main :: IO ()
0 commit comments