taffybar-0.4.6: A desktop bar similar to xmobar, but with more GUI

Copyright | (c) José A. Romero L.
License | BSD3-style (see LICENSE)
Maintainer | José A. Romero L. <escherdragon@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

System.Taffybar.NetMonitor

Description

Simple text widget that displays incoming/outgoing network traffic over one selected interface, as provided by the System.Information.Network module.

Synopsis

- netMonitorNew :: Double -> String -> IO Widget
- netMonitorNewWith :: Double -> String -> Integer -> String -> IO Widget
- defaultNetFormat :: String

# Documentation

netMonitorNew Source #

Arguments

:: Double | Polling interval (in seconds, e.g. 1.5)
-> String | Name of the network interface to monitor (e.g. "eth0", "wlan1")
-> IO Widget |

Creates a new network monitor widget. It consists of two `PollingLabel`s, one for incoming and one for outgoing traffic fed by regular calls to `getNetInfo`.

netMonitorNewWith Source #

Arguments

:: Double | Polling interval (in seconds, e.g. 1.5)
-> String | Name of the network interface to monitor (e.g. "eth0", "wlan1")
-> Integer | Precision for an output
-> String | Template for an output. You can use variables: $inB$, $inKB$, $inMB$, $outB$, $outKB$, $outMB$
-> IO Widget |

Creates a new network monitor widget with custom template and precision. Similar to `netMonitorNew`.

The format template currently supports three units: bytes, kilobytes, and megabytes. Automatic intelligent unit selection is planned, eventually.

defaultNetFormat :: String Source #