summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Wireless.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/Monitors/Wireless.hs')
-rw-r--r--Plugins/Monitors/Wireless.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Plugins/Monitors/Wireless.hs b/Plugins/Monitors/Wireless.hs
index eb07afe..4ac0c10 100644
--- a/Plugins/Monitors/Wireless.hs
+++ b/Plugins/Monitors/Wireless.hs
@@ -18,14 +18,17 @@ import Plugins.Monitors.Common
import IWlib
wirelessConfig :: IO MConfig
-wirelessConfig = mkMConfig "<essid> <quality>" ["essid", "quality"]
+wirelessConfig =
+ mkMConfig "<essid> <quality>" ["essid", "quality", "qualitybar"]
runWireless :: [String] -> Monitor String
runWireless (iface:_) = do
wi <- io $ getWirelessInfo iface
let essid = wiEssid wi
qlty = wiQuality wi
+ fqlty = fromIntegral qlty
e = if essid == "" then "N/A" else essid
q <- if qlty >= 0 then showWithColors show qlty else showWithPadding ""
- parseTemplate [e, q]
+ qb <- showPercentBar fqlty (fqlty / 100)
+ parseTemplate [e, q, qb]
runWireless _ = return "" \ No newline at end of file