summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-02-01 19:12:47 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-02-01 19:12:47 +0100
commit30d1e63298d35811d91df14f5cbc6b38e6e8003d (patch)
tree03fe0093f02dba11f28fea4a8f5b32a7b727eea1
parent7d32da7117f91c65bbc58c30648b60d767ebf8c3 (diff)
downloadxmobar-30d1e63298d35811d91df14f5cbc6b38e6e8003d.tar.gz
xmobar-30d1e63298d35811d91df14f5cbc6b38e6e8003d.tar.bz2
Wireless monitor honours padding settings for ESSIDs
Hat tip David U.
-rw-r--r--NEWS3
-rw-r--r--src/Plugins/Monitors/Wireless.hs3
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c68b90e..eda3af3 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ _Incompatible changes_
_New features_
- Dependency on GHC's threaded runtime has been eliminated.
- - New MPRIS (version 1 and 2) monitor, by Artem Tarasov.
+ - New MPRIS (versions 1 and 2) monitor, by Artem Tarasov.
- New monitor option `-d` to specify the number of decimal places to
display for float numbers. Defaults to 0. See [issue 58].
@@ -22,6 +22,7 @@ _Bug fixes_
- [issue 67]: compilation in DragonFly.
- DiskIO works also when device path in mtab are symbolic links
to the real device file.
+ - Wireless monitor honours padding settings for ESSID names.
[issue 56]: http://code.google.com/p/xmobar/issues/detail?id=56
[issue 58]: http://code.google.com/p/xmobar/issues/detail?id=58
diff --git a/src/Plugins/Monitors/Wireless.hs b/src/Plugins/Monitors/Wireless.hs
index 503dd11..8d32c99 100644
--- a/src/Plugins/Monitors/Wireless.hs
+++ b/src/Plugins/Monitors/Wireless.hs
@@ -27,7 +27,8 @@ runWireless (iface:_) = do
let essid = wiEssid wi
qlty = fromIntegral $ wiQuality wi
e = if essid == "" then "N/A" else essid
+ ep <- showWithPadding e
q <- if qlty >= 0 then showPercentWithColors (qlty/100) else showWithPadding ""
qb <- showPercentBar qlty (qlty / 100)
- parseTemplate [e, q, qb]
+ parseTemplate [ep, q, qb]
runWireless _ = return ""