switch to resizable tall layout

This commit is contained in:
♥ Minnie ♥ 2025-10-05 09:52:38 +08:00
parent 7568c2aa01
commit 39d04d2369
Signed by: jasmine
GPG key ID: 8563E358D4E8040E

View file

@ -10,6 +10,7 @@ import XMonad.Hooks.Modal
import XMonad.Hooks.StatusBar import XMonad.Hooks.StatusBar
import XMonad.Layout.NoBorders import XMonad.Layout.NoBorders
import XMonad.Layout.Renamed import XMonad.Layout.Renamed
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import XMonad.StackSet qualified as W import XMonad.StackSet qualified as W
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
@ -115,9 +116,17 @@ myKeymap =
, ("M-S-4", windows $ W.shift "games") , ("M-S-4", windows $ W.shift "games")
, ("M-S-5", windows $ W.shift "misc" ) , ("M-S-5", windows $ W.shift "misc" )
-- resize window proportions
, ("M-S-<Up>" , sendMessage MirrorExpand)
, ("M-S-<Down>" , sendMessage MirrorShrink)
, ("M-S-<Left>" , sendMessage Shrink)
, ("M-S-<Right>", sendMessage Expand)
-- master window operations -- master window operations
, ("M-<Delete>", windows W.focusMaster) , ("M-<Delete>" , windows W.focusMaster)
, ("M-S-<Delete>", windows W.swapMaster ) , ("M-S-<Delete>", windows W.swapMaster )
, ("M-S-<Home>" , sendMessage (IncMasterN 1))
, ("M-S-<End>" , sendMessage (IncMasterN (-1)))
-- --
@ -143,15 +152,11 @@ layoutMode = mode "layout" $ mkKeysEz
[ ("t", sendMessage (JumpToLayout "dynamic tiling") >> exitMode) [ ("t", sendMessage (JumpToLayout "dynamic tiling") >> exitMode)
, ("m", sendMessage (JumpToLayout "maximised" ) >> exitMode) , ("m", sendMessage (JumpToLayout "maximised" ) >> exitMode)
, ("f", sendMessage (JumpToLayout "fullscreen" ) >> exitMode) , ("f", sendMessage (JumpToLayout "fullscreen" ) >> exitMode)
-- adjust master/slave split (stays in mode)
, ("<Left>", sendMessage Shrink)
, ("<Right>", sendMessage Expand)
, ("<Up>", sendMessage (IncMasterN 1))
, ("<Down>", sendMessage (IncMasterN (-1)))
] ]
spawnMode :: Mode spawnMode :: Mode
spawnMode = mode "launch" $ mkKeysEz spawnMode = mode "launch" $ mkKeysEz
-- spawn programs (exits immediately)
[ ("t", spawn myFileManager >> exitMode) [ ("t", spawn myFileManager >> exitMode)
, ("s", spawn myScrot >> exitMode) , ("s", spawn myScrot >> exitMode)
] ]
@ -164,7 +169,7 @@ spawnMode = mode "launch" $ mkKeysEz
myLayouts = myTile ||| myMax ||| myFull myLayouts = myTile ||| myMax ||| myFull
where where
-- our layouts -- our layouts
myTile = renamed [Replace "dynamic tiling"] . avoidStruts . myGaps $ Tall nmaster delta ratio myTile = renamed [Replace "dynamic tiling"] . avoidStruts . myGaps $ ResizableTall nmaster delta ratio []
myMax = renamed [Replace "maximised" ] . avoidStruts . myGaps $ Full myMax = renamed [Replace "maximised" ] . avoidStruts . myGaps $ Full
myFull = renamed [Replace "fullscreen" ] . noBorders $ Full myFull = renamed [Replace "fullscreen" ] . noBorders $ Full
-- add a configurable amount of space around windows. -- add a configurable amount of space around windows.