diff options
Diffstat (limited to 'src/Top.hs')
-rw-r--r-- | src/Top.hs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/Top.hs b/src/Top.hs new file mode 100644 index 0000000..c14b56a --- /dev/null +++ b/src/Top.hs @@ -0,0 +1,46 @@ +import Xmobar +import Config + +topProc p = TopProc (p <~> ["-t" , "<mboth3> <mboth2> <mboth1> \ + \· <both3> <both2> <both1>" + , "-w", "10", "-L" , "10", "-H", "80"]) 15 + +wireless p = Wireless "wlan0" (p <~> ["-t" , "<essid> <quality>" + , "-W", "5", "-M", "15" , "-m", "2" + , "-L", "20", "-H", "80"]) 20 + +multiCPU p = MultiCpu (p <~> ["-t", "<autototal>" + , "-S", "on", "-b", " ", "-f", "*" + , "-c", " " , "-L", "30", "-H", "70" + , "-p", "3", "-a", "l"]) 10 + +cpuFreq p = CpuFreq (p <~> ["-t" , "<cpu0> <cpu1> <cpu2> <cpu3>" + , "-L", "1", "-H", "2", "-S", "Off" , "-d", "2"]) 50 + +dynNetwork p = DynNetwork (p <~> ["-t", "↑ <tx> ↓ <rx>" + , "-L", "20", "-H", "1024000" + , "-m", "5", "-W", "10", "-S", "Off"]) 10 + +network p = Network "tun0" ["-t", "<dev>:", "-x", ""] 20 + +config p = (baseConfig p) { + position = Static {xpos=1, ypos=1, width=1920, height=24} + , textOffset = 16 + , commands = [ Run (topProc p) + , Run (wireless p) + , Run (multiCPU p) + , Run (cpuFreq p) + , Run (dynNetwork p) + , Run (network p) + , Run XMonadLog + , Run (DateZone "%H" "en_US" "US/Pacific" "laTime" 10) + , Run (Date "%R" "datetime" 10) + ] + , template = " |top| {|XMonadLog|}\ + \ |cpufreq| |multicpu| |dynnetwork|\ + \ <action=`wicd-client -n`>|tun0||wlan0wi|</action>\ + \ |datetime| |laTime| " +} + +main :: IO () +main = palette >>= xmobar . config |