summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Common')
-rw-r--r--src/Xmobar/Plugins/Monitors/Common/Output.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Common/Output.hs b/src/Xmobar/Plugins/Monitors/Common/Output.hs
index d87263f..bd60710 100644
--- a/src/Xmobar/Plugins/Monitors/Common/Output.hs
+++ b/src/Xmobar/Plugins/Monitors/Common/Output.hs
@@ -223,7 +223,7 @@ showPercentBar v x = do
bw <- getConfigValue barWidth
let c = bw < 1
w = if c then length bf else bw
- len = min w $ round (fromIntegral w * x)
+ len = min w $ (if c then ceiling else round) (fromIntegral w * x)
bfs = if c then [bf !! max 0 (len - 1)] else take len $ cycle bf
s <- colorizeString v bfs
return $ s ++ if c then "" else take (bw - len) (cycle bb)