summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins')
-rw-r--r--src/Plugins/Monitors/Batt.hs2
-rw-r--r--src/Plugins/Monitors/Bright.hs2
-rw-r--r--src/Plugins/Monitors/Common.hs4
-rw-r--r--src/Plugins/Monitors/Cpu.hs2
-rw-r--r--src/Plugins/Monitors/Mem.hs4
-rw-r--r--src/Plugins/Monitors/MultiCpu.hs2
-rw-r--r--src/Plugins/Monitors/Volume.hs2
-rw-r--r--src/Plugins/Monitors/Wireless.hs2
8 files changed, 10 insertions, 10 deletions
diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs
index d6b8ce0..3eb2051 100644
--- a/src/Plugins/Monitors/Batt.hs
+++ b/src/Plugins/Monitors/Batt.hs
@@ -174,7 +174,7 @@ runBatt' bfs args = do
let x' = minimum [1, x]
p <- showPercentWithColors x'
b <- showPercentBar (100 * x') x'
- vb <- showVerticalBar (100 * x')
+ vb <- showVerticalBar (100 * x') x'
return [b, vb, p]
fmtWatts x o s d = do
ws <- showWithPadding $ showDigits d x ++ (if s then "W" else "")
diff --git a/src/Plugins/Monitors/Bright.hs b/src/Plugins/Monitors/Bright.hs
index 023478a..1c4cc01 100644
--- a/src/Plugins/Monitors/Bright.hs
+++ b/src/Plugins/Monitors/Bright.hs
@@ -77,7 +77,7 @@ runBright args = do
NoFiles -> return "hurz"
_ -> fmtPercent c >>= parseTemplate
where fmtPercent :: Float -> Monitor [String]
- fmtPercent c = do r <- showVerticalBar (100 * c)
+ fmtPercent c = do r <- showVerticalBar (100 * c) c
s <- showPercentWithColors c
t <- showPercentBar (100 * c) c
return [r,s,t]
diff --git a/src/Plugins/Monitors/Common.hs b/src/Plugins/Monitors/Common.hs
index 40545cc..ecc9db4 100644
--- a/src/Plugins/Monitors/Common.hs
+++ b/src/Plugins/Monitors/Common.hs
@@ -451,8 +451,8 @@ showPercentBar v x = do
s <- colorizeString v (take len $ cycle bf)
return $ s ++ take (bw - len) (cycle bb)
-showVerticalBar :: Float -> Monitor String
-showVerticalBar x = colorizeString x [convert x]
+showVerticalBar :: Float -> Float -> Monitor String
+showVerticalBar v x = colorizeString v [convert $ 100 * x]
where convert :: Float -> Char
convert val
| t <= 9600 = ' '
diff --git a/src/Plugins/Monitors/Cpu.hs b/src/Plugins/Monitors/Cpu.hs
index 7116f5e..6e83c67 100644
--- a/src/Plugins/Monitors/Cpu.hs
+++ b/src/Plugins/Monitors/Cpu.hs
@@ -47,7 +47,7 @@ formatCpu [] = return $ replicate 8 ""
formatCpu xs = do
let t = sum $ take 3 xs
b <- showPercentBar (100 * t) t
- v <- showVerticalBar (100 * t)
+ v <- showVerticalBar (100 * t) t
ps <- showPercentsWithColors (t:xs)
return (b:v:ps)
diff --git a/src/Plugins/Monitors/Mem.hs b/src/Plugins/Monitors/Mem.hs
index e483317..e409095 100644
--- a/src/Plugins/Monitors/Mem.hs
+++ b/src/Plugins/Monitors/Mem.hs
@@ -49,9 +49,9 @@ formatMem (r:fr:xs) =
do let f = showDigits 0
rr = 100 * r
ub <- showPercentBar rr r
- uvb <- showVerticalBar rr
+ uvb <- showVerticalBar rr r
fb <- showPercentBar (100 - rr) (1 - r)
- fvb <- showVerticalBar (100 - rr)
+ fvb <- showVerticalBar (100 - rr) ( 1 - r)
rs <- showPercentWithColors r
fs <- showPercentWithColors fr
s <- mapM (showWithColors f) xs
diff --git a/src/Plugins/Monitors/MultiCpu.hs b/src/Plugins/Monitors/MultiCpu.hs
index 2089fca..429c38a 100644
--- a/src/Plugins/Monitors/MultiCpu.hs
+++ b/src/Plugins/Monitors/MultiCpu.hs
@@ -63,7 +63,7 @@ formatCpu xs
| length xs < 4 = showPercentsWithColors $ replicate vNum 0.0
| otherwise = let t = foldr (+) 0 $ take 3 xs
in do b <- showPercentBar (100 * t) t
- h <- showVerticalBar (100 * t)
+ h <- showVerticalBar (100 * t) t
ps <- showPercentsWithColors (t:xs)
return (b:h:ps)
diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs
index d7122d1..22b7f6c 100644
--- a/src/Plugins/Monitors/Volume.hs
+++ b/src/Plugins/Monitors/Volume.hs
@@ -78,7 +78,7 @@ formatVolBar lo hi v =
formatVolVBar :: Integer -> Integer -> Integer -> Monitor String
formatVolVBar lo hi v =
- showVerticalBar (100 * x) where x = percent v lo hi
+ showVerticalBar (100 * x) x where x = percent v lo hi
switchHelper :: VolumeOpts
-> (VolumeOpts -> Maybe String)
diff --git a/src/Plugins/Monitors/Wireless.hs b/src/Plugins/Monitors/Wireless.hs
index d5342a1..c6e6b44 100644
--- a/src/Plugins/Monitors/Wireless.hs
+++ b/src/Plugins/Monitors/Wireless.hs
@@ -33,6 +33,6 @@ runWireless (iface:_) = do
then showPercentWithColors (qlty / 100)
else showWithPadding ""
qb <- showPercentBar qlty (qlty / 100)
- qvb <- showVerticalBar qlty
+ qvb <- showVerticalBar qlty (qlty / 100)
parseTemplate [ep, q, qb, qvb]
runWireless _ = getConfigValue naString