diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-10-27 16:20:25 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-10-27 16:20:25 +0100 |
commit | 3d2af8a47332235d6556d2d2a40f7392269cf0b0 (patch) | |
tree | 75f75e4dd2bbae0106b77e333213ee6c9b6d4754 /src/Plugins/Monitors/Wireless.hs | |
parent | 7e89ff8e2007e057a0b00a5a9c1fd953c565db25 (diff) | |
download | xmobar-3d2af8a47332235d6556d2d2a40f7392269cf0b0.tar.gz xmobar-3d2af8a47332235d6556d2d2a40f7392269cf0b0.tar.bz2 |
New N/A string monitor option (cf. #119)
Diffstat (limited to 'src/Plugins/Monitors/Wireless.hs')
-rw-r--r-- | src/Plugins/Monitors/Wireless.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Wireless.hs b/src/Plugins/Monitors/Wireless.hs index 8d32c99..f8192dc 100644 --- a/src/Plugins/Monitors/Wireless.hs +++ b/src/Plugins/Monitors/Wireless.hs @@ -24,11 +24,14 @@ wirelessConfig = runWireless :: [String] -> Monitor String runWireless (iface:_) = do wi <- io $ getWirelessInfo iface + na <- getConfigValue naString let essid = wiEssid wi qlty = fromIntegral $ wiQuality wi - e = if essid == "" then "N/A" else essid + e = if essid == "" then na else essid ep <- showWithPadding e - q <- if qlty >= 0 then showPercentWithColors (qlty/100) else showWithPadding "" + q <- if qlty >= 0 + then showPercentWithColors (qlty / 100) + else showWithPadding "" qb <- showPercentBar qlty (qlty / 100) parseTemplate [ep, q, qb] -runWireless _ = return "" +runWireless _ = getConfigValue naString |