diff options
author | jao <jao@gnu.org> | 2022-08-13 17:39:37 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-13 17:39:37 +0100 |
commit | 1136c5da379db5034a4bf41236ad868d7fd479a4 (patch) | |
tree | 3a97c9902d0735a2cf27562ee8cc429f6360643e /src | |
parent | 72ba87a9df87f8a16af96c21c3dcf6c387875294 (diff) | |
download | xmobar-1136c5da379db5034a4bf41236ad868d7fd479a4.tar.gz xmobar-1136c5da379db5034a4bf41236ad868d7fd479a4.tar.bz2 |
fix: in -W0, char 0->[0,10], char 1->[10,20]...
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Common/Output.hs | 2 |
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) |