aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Layout
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-04-16 00:20:03 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit1ba923704e7889205f574de1b85f48773ec6aca7 (patch)
tree84b248671ab8918a12bb95a3ca62fb1912b934f2 /src/Rahm/Desktop/Layout
parent9e5d56cfb2508d9f5e58bf681265d0f1070b3f35 (diff)
downloadrde-1ba923704e7889205f574de1b85f48773ec6aca7.tar.gz
rde-1ba923704e7889205f574de1b85f48773ec6aca7.tar.bz2
rde-1ba923704e7889205f574de1b85f48773ec6aca7.zip
fix some hlint warnings
Diffstat (limited to 'src/Rahm/Desktop/Layout')
-rw-r--r--src/Rahm/Desktop/Layout/ConsistentMosaic.hs4
-rw-r--r--src/Rahm/Desktop/Layout/Flip.hs2
-rw-r--r--src/Rahm/Desktop/Layout/Hole.hs4
-rw-r--r--src/Rahm/Desktop/Layout/List.hs4
-rw-r--r--src/Rahm/Desktop/Layout/Pop.hs4
-rw-r--r--src/Rahm/Desktop/Layout/Redescribe.hs2
-rw-r--r--src/Rahm/Desktop/Layout/ReinterpretMessage.hs2
7 files changed, 11 insertions, 11 deletions
diff --git a/src/Rahm/Desktop/Layout/ConsistentMosaic.hs b/src/Rahm/Desktop/Layout/ConsistentMosaic.hs
index db1ce4e..a84a2f1 100644
--- a/src/Rahm/Desktop/Layout/ConsistentMosaic.hs
+++ b/src/Rahm/Desktop/Layout/ConsistentMosaic.hs
@@ -37,7 +37,7 @@ shrinkPositionAlt = doAlt shrinkWindowAlt
instance (LayoutClass l a, Show a, Ord a, Enum a, Num a) => LayoutClass (MosaicWrap l) a where
-
+
runLayout (W.Workspace t (MosaicWrap l) (id -> Just s)) rect = do
let zs = zipStack [100..] s
s' = mapStack fst zs
@@ -59,7 +59,7 @@ instance (LayoutClass l a, Show a, Ord a, Enum a, Num a) => LayoutClass (MosaicW
runLayout (W.Workspace t (MosaicWrap l) a) rect = do
(rects, maybeNewLayout) <- runLayout (W.Workspace t l a) rect
return (rects, MosaicWrap <$> maybeNewLayout)
-
+
-- By default just pass the message to the underlying layout.
handleMessage (MosaicWrap l) mess = do
diff --git a/src/Rahm/Desktop/Layout/Flip.hs b/src/Rahm/Desktop/Layout/Flip.hs
index e0d3abc..fe425e9 100644
--- a/src/Rahm/Desktop/Layout/Flip.hs
+++ b/src/Rahm/Desktop/Layout/Flip.hs
@@ -69,7 +69,7 @@ instance LayoutModifier Flip a where
Rectangle ((sx + fromIntegral sw) - x - fromIntegral w + sx) y w h
flipHoriz (Rectangle x y w h) =
Rectangle x ((sy + fromIntegral sh) - y - fromIntegral h + sy) w h
-
+
-- Handle DoFlip messages.
pureMess flip (fromMessage -> Just (DoFlip f)) = Just (f flip)
pureMess _ _ = Nothing
diff --git a/src/Rahm/Desktop/Layout/Hole.hs b/src/Rahm/Desktop/Layout/Hole.hs
index ee59726..3f7c9b7 100644
--- a/src/Rahm/Desktop/Layout/Hole.hs
+++ b/src/Rahm/Desktop/Layout/Hole.hs
@@ -32,11 +32,11 @@ instance (LayoutClass l a, Eq a, Num a) => LayoutClass (Hole l) a where
app x w | not enabled = w
app x (W.Workspace t l s) =
case s of
- Nothing ->
+ Nothing ->
W.Workspace t l (Just $ W.Stack x [] [])
Just (W.Stack h c e) ->
W.Workspace t l (Just $ W.Stack h c (e ++ [x]))
-
+
handleMessage h (fromMessage -> Just (ManageHole f)) =
return $ Just $ f h
handleMessage (Hole e l) a = do
diff --git a/src/Rahm/Desktop/Layout/List.hs b/src/Rahm/Desktop/Layout/List.hs
index f533ea2..77b53c9 100644
--- a/src/Rahm/Desktop/Layout/List.hs
+++ b/src/Rahm/Desktop/Layout/List.hs
@@ -102,7 +102,7 @@ instance (Selector t) => Selector (Sel t) where
increment (Skip l) = Skip <$> increment l
-- If the current element is selected, the increment is just the initial of
-- the tail.
- increment Sel = Skip <$> initial
+ increment Sel = Skip <$> initial
-- For a selection, the initial is just this in the Sel state.
initial = Just Sel
@@ -178,7 +178,7 @@ layoutListLengthProxy _ = Proxy
(|:) :: (LayoutSelect t a, LayoutClass l a) => l a -> t a -> LCons l t a
(|:) = LCons
-infixr 5 |:
+infixr 5 |:
-- Constructs a LayoutList. This function enforces that the SelectorFor l
-- is a 'Sel' type. Essentially this enforces that there must be at least one
diff --git a/src/Rahm/Desktop/Layout/Pop.hs b/src/Rahm/Desktop/Layout/Pop.hs
index 7e3dbd1..e06ff25 100644
--- a/src/Rahm/Desktop/Layout/Pop.hs
+++ b/src/Rahm/Desktop/Layout/Pop.hs
@@ -37,7 +37,7 @@ data PopMessage where
deriving (Message)
resizePop :: Float -> PopMessage
-resizePop f = PopMessage $ \(Poppable b x y l) ->
+resizePop f = PopMessage $ \(Poppable b x y l) ->
Poppable b (g $ x + f) (g $ y + f) l
where
g = max 0 . min 0.45
@@ -52,7 +52,7 @@ poppable :: l a -> Poppable l a
poppable = Poppable False 0.05 0.05
instance (LayoutClass l a, Eq a) => LayoutClass (Poppable l) a where
-
+
-- If the current layout is not popped, then just return what the underlying
-- layout returned.
diff --git a/src/Rahm/Desktop/Layout/Redescribe.hs b/src/Rahm/Desktop/Layout/Redescribe.hs
index c5c7472..036bc88 100644
--- a/src/Rahm/Desktop/Layout/Redescribe.hs
+++ b/src/Rahm/Desktop/Layout/Redescribe.hs
@@ -11,7 +11,7 @@ import Data.Typeable (Typeable)
-- Type-class to modify the description of a layout.
class Describer m l where
-
+
-- Returns the new description from the given description modifier, the layout
-- and the existing description.
newDescription :: m -> l a -> String -> String
diff --git a/src/Rahm/Desktop/Layout/ReinterpretMessage.hs b/src/Rahm/Desktop/Layout/ReinterpretMessage.hs
index 8f6a78d..e3434b1 100644
--- a/src/Rahm/Desktop/Layout/ReinterpretMessage.hs
+++ b/src/Rahm/Desktop/Layout/ReinterpretMessage.hs
@@ -31,7 +31,7 @@ data ReinterpretMessage k a = ReinterpretMessage
-- Instance for ReinterpretMessage as a Layout modifier.
instance (DoReinterpret k) =>
- LayoutModifier (ReinterpretMessage k) a where
+ LayoutModifier (ReinterpretMessage k) a where
handleMessOrMaybeModifyIt self message = do