diff options
author | Reto Habluetzel <rethab@rethab.ch> | 2012-08-29 23:12:08 +0200 |
---|---|---|
committer | Reto Habluetzel <rethab@rethab.ch> | 2012-08-29 23:12:08 +0200 |
commit | a9de120224fa1dbb1f740d3d51d8bde6432c0884 (patch) | |
tree | 2da324c6d809a0c31bf97950c192c510cffdbc3b /src/Plugins/Monitors.hs | |
parent | e02c6bab1b6fa788c274e4b42a04e057273c3000 (diff) | |
download | xmobar-a9de120224fa1dbb1f740d3d51d8bde6432c0884.tar.gz xmobar-a9de120224fa1dbb1f740d3d51d8bde6432c0884.tar.bz2 |
added dynnetwork, which selects the busiest network of a list and displays it
Diffstat (limited to 'src/Plugins/Monitors.hs')
-rw-r--r-- | src/Plugins/Monitors.hs | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs index a531e26..bea91eb 100644 --- a/src/Plugins/Monitors.hs +++ b/src/Plugins/Monitors.hs @@ -48,24 +48,25 @@ import Plugins.Monitors.Volume import Plugins.Monitors.Mpris #endif -data Monitors = Weather Station Args Rate - | Network Interface Args Rate - | BatteryP [String] Args Rate - | DiskU DiskSpec Args Rate - | DiskIO DiskSpec Args Rate - | Thermal Zone Args Rate - | ThermalZone ZoneNo Args Rate - | Memory Args Rate - | Swap Args Rate - | Cpu Args Rate - | MultiCpu Args Rate - | Battery Args Rate - | Brightness Args Rate - | CpuFreq Args Rate - | CoreTemp Args Rate - | TopProc Args Rate - | TopMem Args Rate - | Uptime Args Rate +data Monitors = Weather Station Args Rate + | Network Interface Args Rate + | DynNetwork [Interface] Args Rate + | BatteryP [String] Args Rate + | DiskU DiskSpec Args Rate + | DiskIO DiskSpec Args Rate + | Thermal Zone Args Rate + | ThermalZone ZoneNo Args Rate + | Memory Args Rate + | Swap Args Rate + | Cpu Args Rate + | MultiCpu Args Rate + | Battery Args Rate + | Brightness Args Rate + | CpuFreq Args Rate + | CoreTemp Args Rate + | TopProc Args Rate + | TopMem Args Rate + | Uptime Args Rate #ifdef IWLIB | Wireless Interface Args Rate #endif @@ -95,6 +96,7 @@ type DiskSpec = [(String, String)] instance Exec Monitors where alias (Weather s _ _) = s alias (Network i _ _) = i + alias (DynNetwork _ _ _) = "dynnetwork" alias (Thermal z _ _) = z alias (ThermalZone z _ _) = "thermal" ++ show z alias (Memory _ _) = "memory" @@ -126,6 +128,7 @@ instance Exec Monitors where alias (Mpris2 _ _ _) = "mpris2" #endif start (Network i a r) = startNet i a r + start (DynNetwork is a r) = startDynNet is a r start (Cpu a r) = startCpu a r start (MultiCpu a r) = startMultiCpu a r start (TopProc a r) = startTop a r |