about summary refs log tree commit diff
path: root/src/XMonad/Custom/Layout.hs
diff options
context:
space:
mode:
authorazahi <azahi@teknik.io>2018-06-12 22:59:58 +0300
committerazahi <azahi@teknik.io>2018-06-12 22:59:58 +0300
commitb975c0a90dce97c8d96ab464d69575a9d8c150b3 (patch)
tree714936c56a45e1142347d763e01984f5db881fbf /src/XMonad/Custom/Layout.hs
parentAdd Stack integration (diff)
Add X.Custom and split existing code in modules
Diffstat (limited to '')
-rw-r--r--src/XMonad/Custom/Layout.hs56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/XMonad/Custom/Layout.hs b/src/XMonad/Custom/Layout.hs
new file mode 100644
index 0000000..8f14926
--- /dev/null
+++ b/src/XMonad/Custom/Layout.hs
@@ -0,0 +1,56 @@
+{-# LANGUAGE DeriveDataTypeable    #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE TypeSynonymInstances  #-}
+
+module XMonad.Custom.Layout
+    ( layoutHook'
+    , Transformers (..)
+    ) where
+
+import           XMonad
+import           XMonad.Custom.Theme
+import           XMonad.Hooks.ManageDocks
+import           XMonad.Layout.Accordion
+import           XMonad.Layout.BinarySpacePartition
+import           XMonad.Layout.Fullscreen
+import           XMonad.Layout.Gaps
+import           XMonad.Layout.Hidden
+import           XMonad.Layout.LayoutModifier
+import           XMonad.Layout.MultiToggle
+import           XMonad.Layout.MultiToggle.Instances
+import           XMonad.Layout.NoBorders
+import           XMonad.Layout.Reflect
+import           XMonad.Layout.Simplest
+import           XMonad.Layout.Spacing
+import           XMonad.Layout.SubLayouts
+import           XMonad.Layout.Tabbed
+import           XMonad.Layout.WindowNavigation
+
+applySpacing :: l a -> ModifiedLayout Spacing l a
+applySpacing = spacing gapBase
+
+applyGaps :: l a -> ModifiedLayout Gaps l a
+applyGaps = gaps [ (U, gapBase)
+                 , (D, gapBase)
+                 , (R, gapBase)
+                 , (L, gapBase)
+                 ]
+
+data Transformers = GAPS
+                  deriving (Read, Show, Eq, Typeable)
+
+instance Transformer Transformers Window where
+    transform GAPS x k = k (avoidStruts $ applyGaps $ applySpacing x) (const x)
+
+layoutHook' = fullscreenFloat
+            $ lessBorders OnlyFloat
+            $ mkToggle (single NBFULL)
+            $ avoidStruts
+            $ mkToggle (single GAPS)
+            $ mkToggle (single REFLECTX)
+            $ mkToggle (single REFLECTY)
+            $ windowNavigation
+            $ addTabs shrinkText tabTheme
+            $ hiddenWindows
+            $ subLayout [] (Simplest ||| Accordion)
+              emptyBSP

Consider giving Nix/NixOS a try! <3