summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Net.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-13 00:24:55 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-13 00:24:55 +0100
commit19f36a28d501773708da02ba149e8d8dae5756aa (patch)
treee6012f6d7a1c21c8dad2e7f027dc921f361251ec /Plugins/Monitors/Net.hs
parentefd9bc7177c66d7bb9a994e919d915ecb5c75154 (diff)
downloadxmobar-19f36a28d501773708da02ba149e8d8dae5756aa.tar.gz
xmobar-19f36a28d501773708da02ba149e8d8dae5756aa.tar.bz2
Use -S in Network to control units display
We've made -P a synonym of -S, and renamed the option to useSuffix.
Diffstat (limited to 'Plugins/Monitors/Net.hs')
-rw-r--r--Plugins/Monitors/Net.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Plugins/Monitors/Net.hs b/Plugins/Monitors/Net.hs
index b17aa44..d9cd534 100644
--- a/Plugins/Monitors/Net.hs
+++ b/Plugins/Monitors/Net.hs
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module Plugins.Monitors.Net where
+module Plugins.Monitors.Net (netConfig, runNet) where
import Plugins.Monitors.Common
import qualified Data.ByteString.Lazy.Char8 as B
@@ -64,8 +64,10 @@ netParser =
formatNet :: Float -> Monitor (String, String)
formatNet d = do
+ s <- getConfigValue useSuffix
+ let str = if s then (++"Kb/s") . showDigits 1 else showDigits 1
b <- showLogBar 0.9 d
- x <- showWithColors (showDigits 1) d
+ x <- showWithColors str d
return (x, b)
printNet :: NetDev -> Monitor String