aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/GridSelect.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Actions/GridSelect.hs')
-rw-r--r--XMonad/Actions/GridSelect.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs
index 064d041..ffde014 100644
--- a/XMonad/Actions/GridSelect.hs
+++ b/XMonad/Actions/GridSelect.hs
@@ -230,7 +230,7 @@ hsv2rgb (h,s,v) =
-- | Default colorizer for Strings
defaultColorizer :: String -> Bool -> X (String, String)
-defaultColorizer s active =
+defaultColorizer s active =
let seed x = toInteger (sum $ map ((*x).fromEnum) s) :: Integer
(r,g,b) = hsv2rgb ((seed 83) `mod` 360,
(fromInteger ((seed 191) `mod` 1000))/2500+0.4,
@@ -254,17 +254,17 @@ colorRangeFromClassName :: (Word8, Word8, Word8) -- ^ Beginning of the color ran
-> (Word8, Word8, Word8) -- ^ Inactive text color
-> (Word8, Word8, Word8) -- ^ Active text color
-> Window -> Bool -> X (String, String)
-colorRangeFromClassName startC endC activeC inactiveT activeT w active =
+colorRangeFromClassName startC endC activeC inactiveT activeT w active =
do classname <- runQuery className w
- if active
+ if active
then return (rgbToHex activeC, rgbToHex activeT)
- else return (rgbToHex $ mix startC endC
+ else return (rgbToHex $ mix startC endC
$ stringToRatio classname, rgbToHex inactiveT)
where rgbToHex :: (Word8, Word8, Word8) -> String
rgbToHex (r, g, b) = '#':twodigitHex r
++twodigitHex g++twodigitHex b
--- | Creates a mix of two colors according to a ratio
+-- | Creates a mix of two colors according to a ratio
-- (1 -> first color, 0 -> second color).
mix :: (Word8, Word8, Word8) -> (Word8, Word8, Word8)
-> Double -> (Word8, Word8, Word8)