Update 'layoutHook'

master
Hektor Misplon 2024-03-30 16:58:57 +01:00
parent e771a09fbe
commit 72629f5b98
Signed by: hektor
GPG Key ID: 5151AF79E723F21C
1 changed files with 29 additions and 16 deletions

View File

@ -14,7 +14,9 @@ import XMonad.Hooks.WindowSwallowing (swallowEventHook)
import XMonad.Layout.CenteredIfSingle import XMonad.Layout.CenteredIfSingle
import XMonad.Layout.IndependentScreens import XMonad.Layout.IndependentScreens
import XMonad.Layout.PerScreen import XMonad.Layout.PerScreen
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Renamed import XMonad.Layout.Renamed
import XMonad.Layout.Spacing
import XMonad.Layout.ThreeColumns import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
import XMonad.Util.Loggers import XMonad.Util.Loggers
@ -108,24 +110,35 @@ myDynamicManageHook =
-- layoutHook {{{ -- layoutHook {{{
myLayoutHook = myLayoutHook =
ifWider smallWidth ( avoidStruts $
t ||| -- Tiled layouts smartSpacingWithEdge 4 $
c3 ||| -- Column layouts layoutHints $
c3m ||| -- onWorkspace "1_sh" (Tall nmaster delta 0.8) $
f -- Monocle layouts ifWider smallWidth (tWide ||| c3mWide ||| f) t
) (
t ||| -- Tiled layouts
f -- Monocle layouts
)
where where
smallWidth = 1920 smallWidth = 1920
t = renamed [Replace "[]+"] $ ifWider smallWidth (centeredIfSingle 0.8 0.9 $ Tall nmaster delta ratio)
(Tall nmaster delta ratio) -- Tall layouts
c3 = renamed [Replace "|||"] $ ThreeCol nmaster delta ratio tWide =
c3m = renamed [Replace "[|]"] $ ThreeColMid nmaster delta ratio centeredIfSingle 0.62 1 t
f = renamed [Replace "[+]"] Full t =
named "[]+" $
Tall nmaster delta ratio
-- Column layouts
c3mWide =
centeredIfSingle 0.62 1 c3m
c3m =
named "[|]" $
ThreeColMid nmaster delta ratio
-- Fullscreen layouts
f = named "[+]" Full
-- Modifiers
named n = renamed [Replace n]
nmaster = 1 nmaster = 1
ratio = 1 / 2 ratio = 0.62
delta = 4 / 100 delta = 4 / 100
-- }}} -- }}}
@ -162,7 +175,7 @@ myConfig =
-- Hooks -- Hooks
startupHook = myStartupHook, startupHook = myStartupHook,
manageHook = myManageHook <+> manageHook def, manageHook = myManageHook <+> manageHook def,
layoutHook = avoidStruts myLayoutHook, layoutHook = myLayoutHook,
handleEventHook = myHandleEventHook handleEventHook = myHandleEventHook
} }
`removeKeysP` myRemoveKeys `removeKeysP` myRemoveKeys