aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-18 16:42:11 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-18 16:42:11 +0530
commitbd78222ad1017f5c9f446af2cbebc67a2336e4c6 (patch)
tree91325810c2ec6019f079c9270b98ee1e913dfa25
parentddd1606d8daaa81fbb1789014632bc7e6d725a73 (diff)
finally added some layouts, I can die now
-rw-r--r--xmonad.hs52
1 files changed, 20 insertions, 32 deletions
diff --git a/xmonad.hs b/xmonad.hs
index f8b46d3e..d4795212 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -11,25 +11,26 @@ import XMonad.Actions.CycleSelectedLayouts
import XMonad.Actions.GridSelect
import XMonad.Actions.SwapWorkspaces
import XMonad.Actions.WindowBringer
+import XMonad.Actions.MouseResize
-- layouts modifiers
import XMonad.Layout.Spacing
import XMonad.Layout.LayoutModifier
-- import XMonad.Layout.LayoutCombinators ((|||))
-import XMonad.Layout.Renamed
-- import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle))
-- import XMonad.Layout.Gaps
-- import XMonad.Layout.ShowWName
-import XMonad.Layout.Renamed
-import XMonad.Layout.WindowNavigation
+import XMonad.Layout.WindowNavigation as WN
+import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..))
-- Layouts
+import XMonad.Layout.BinarySpacePartition
import XMonad.Layout.Grid
-import XMonad.Layout.SimplestFloat
+import XMonad.Layout.ThreeColumns
+-- import XMonad.Layout.SimplestFloat
import XMonad.Layout.Spiral
import XMonad.Layout.ResizableTile
import XMonad.Layout.Tabbed
-import XMonad.Layout.ThreeColumns
-- hooks
@@ -76,8 +77,6 @@ myBrowser = "firefox"
-- myEditor = "vim"
--- ~defaults~
-
-- wm variables
nBorder = "#bf00ff"
@@ -88,19 +87,6 @@ myBorderWidth = 2
myExtraWorkspaces = [(xK_0, "10")] -- ,(xK_minus, "tmp"),(xK_equal, "swap")]
myWorkspaces = ["1","2","3","4","5","6","7","8", "9"] ++ (map snd myExtraWorkspaces)
-myLayoutHook = windowNavigation Grid
-
-
-
-
--- ~wm variables~
-
--- functions
-
-windowGaps i j = spacingRaw False (Border i i i i) True (Border j j j j) True $
- layoutHook def
-
--- ~functions~
-- keybindings
@@ -126,6 +112,9 @@ myKeys = [
, ((mod4Mask .|. shiftMask, xK_Return), windows W.swapMaster) -- Swap the focused window and the master window
+ -- these keybindings are for WindowNavigation
+ -- and they conflict with BSP layout
+
-- directional navigation of windows
, ((mod4Mask, xK_l), sendMessage $ Go R)
, ((mod4Mask, xK_h), sendMessage $ Go L)
@@ -133,17 +122,11 @@ myKeys = [
, ((mod4Mask, xK_j), sendMessage $ Go D)
-- swap windows
- , ((mod4Mask .|. shiftMask, xK_l), sendMessage $ Swap R)
- , ((mod4Mask .|. shiftMask, xK_h), sendMessage $ Swap L)
- , ((mod4Mask .|. shiftMask, xK_k), sendMessage $ Swap U)
- , ((mod4Mask .|. shiftMask, xK_j), sendMessage $ Swap D)
+ , ((mod4Mask .|. shiftMask, xK_l), sendMessage $ WN.Swap R)
+ , ((mod4Mask .|. shiftMask, xK_h), sendMessage $ WN.Swap L)
+ , ((mod4Mask .|. shiftMask, xK_k), sendMessage $ WN.Swap U)
+ , ((mod4Mask .|. shiftMask, xK_j), sendMessage $ WN.Swap D)
- -- move windows
- , ((mod4Mask .|. controlMask, xK_l), sendMessage $ Move R)
- , ((mod4Mask .|. controlMask, xK_h), sendMessage $ Move L)
- , ((mod4Mask .|. controlMask, xK_k), sendMessage $ Move U)
- , ((mod4Mask .|. controlMask, xK_j), sendMessage $ Move D)
-
-- cycle through windows
, ((mod1Mask, xK_j), windows W.focusDown)
, ((mod1Mask, xK_k), windows W.focusUp)
@@ -177,13 +160,18 @@ myKeys = [
| (i, k) <- zip myWorkspaces [xK_1 ..]
]
--- ~keybindings~
-- layouts
+sGap = 2
+wGap = 2
+
+myGap = spacingRaw False (Border sGap sGap sGap sGap) True (Border wGap wGap wGap wGap) True
+
+myLayouts = avoidStruts $ mouseResize $ windowArrange $ windowNavigation $ myGap $ Grid ||| emptyBSP -- $ myGaps
+myLayoutHook = myLayouts
--- ~layouts~
main = do