diff options
| author | Josh Rahm <rahm@google.com> | 2022-11-21 12:05:03 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-11-21 12:05:03 -0700 |
| commit | ee9be16599f20aef6d1d3fd15666c00452f85aba (patch) | |
| tree | 1aed66c1de2ce201463e3becc2d452d4a8aa2992 /src/Rahm/Desktop/Layout/Redescribe.hs | |
| parent | a1636c65e05d02f7d4fc408137e1d37b412ce890 (diff) | |
| download | rde-ee9be16599f20aef6d1d3fd15666c00452f85aba.tar.gz rde-ee9be16599f20aef6d1d3fd15666c00452f85aba.tar.bz2 rde-ee9be16599f20aef6d1d3fd15666c00452f85aba.zip | |
Format with ormolu.
Diffstat (limited to 'src/Rahm/Desktop/Layout/Redescribe.hs')
| -rw-r--r-- | src/Rahm/Desktop/Layout/Redescribe.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Rahm/Desktop/Layout/Redescribe.hs b/src/Rahm/Desktop/Layout/Redescribe.hs index 7f955d8..f5e51b7 100644 --- a/src/Rahm/Desktop/Layout/Redescribe.hs +++ b/src/Rahm/Desktop/Layout/Redescribe.hs @@ -1,17 +1,14 @@ - -- Module to enable redescribing layouts. Unlike LayoutModifiers though, this -- class is aware of the underlying type as it may need to access some internals -- to generate the new description. module Rahm.Desktop.Layout.Redescribe where -import XMonad - -import qualified Rahm.Desktop.StackSet as W import Data.Typeable (Typeable) +import qualified Rahm.Desktop.StackSet as W +import XMonad -- 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 @@ -21,9 +18,10 @@ data Redescribe m l a = Redescribe m (l a) deriving (Show, Read) -- Delegates to the underlying Layout, except for the description -instance (Typeable m, Show m, Describer m l, LayoutClass l a) => - LayoutClass (Redescribe m l) a where - +instance + (Typeable m, Show m, Describer m l, LayoutClass l a) => + LayoutClass (Redescribe m l) a + where runLayout (W.Workspace t (Redescribe m l) a) rect = do (rects, maybeNewLayout) <- runLayout (W.Workspace t l a) rect return (rects, fmap (Redescribe m) maybeNewLayout) |