aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Layout/CornerLayout.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-11-21 12:05:03 -0700
committerJosh Rahm <rahm@google.com>2022-11-21 12:05:03 -0700
commitee9be16599f20aef6d1d3fd15666c00452f85aba (patch)
tree1aed66c1de2ce201463e3becc2d452d4a8aa2992 /src/Rahm/Desktop/Layout/CornerLayout.hs
parenta1636c65e05d02f7d4fc408137e1d37b412ce890 (diff)
downloadrde-ee9be16599f20aef6d1d3fd15666c00452f85aba.tar.gz
rde-ee9be16599f20aef6d1d3fd15666c00452f85aba.tar.bz2
rde-ee9be16599f20aef6d1d3fd15666c00452f85aba.zip
Format with ormolu.
Diffstat (limited to 'src/Rahm/Desktop/Layout/CornerLayout.hs')
-rw-r--r--src/Rahm/Desktop/Layout/CornerLayout.hs24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/Rahm/Desktop/Layout/CornerLayout.hs b/src/Rahm/Desktop/Layout/CornerLayout.hs
index 7cf4421..f87d9fa 100644
--- a/src/Rahm/Desktop/Layout/CornerLayout.hs
+++ b/src/Rahm/Desktop/Layout/CornerLayout.hs
@@ -3,8 +3,8 @@
module Rahm.Desktop.Layout.CornerLayout where
import Data.Typeable (Typeable)
-import XMonad (LayoutClass(..), Rectangle(..), Resize(..), fromMessage)
import qualified Rahm.Desktop.StackSet as S
+import XMonad (LayoutClass (..), Rectangle (..), Resize (..), fromMessage)
data Corner a = Corner Rational Rational
deriving (Show, Typeable, Read)
@@ -20,18 +20,20 @@ instance LayoutClass Corner a where
vn = (length ws - 1) `div` 2
hn = (length ws - 1) - vn
- in
- case ws of
+ in case ws of
[a] -> [(a, screen)]
- [a, b] -> [
- (a, Rectangle x y w' h),
- (b, Rectangle (x + fromIntegral w') y (w - w') h)]
+ [a, b] ->
+ [ (a, Rectangle x y w' h),
+ (b, Rectangle (x + fromIntegral w') y (w - w') h)
+ ]
_ ->
- zip ws $ map (
- \(Rectangle x' y' w h) -> Rectangle (x + x') (y + y') w h) $
- corner :
- splitVert vertRect vn ++
- splitHoriz horizRect hn
+ zip ws $
+ map
+ ( \(Rectangle x' y' w h) -> Rectangle (x + x') (y + y') w h
+ )
+ $ corner :
+ splitVert vertRect vn
+ ++ splitHoriz horizRect hn
pureMessage (Corner frac delta) m = fmap resize (fromMessage m)
where