xmonad: add constansts for layout ids
This commit is contained in:
parent
f04cae86eb
commit
d7dfeb35fd
1 changed files with 9 additions and 5 deletions
|
@ -163,9 +163,9 @@ myPolybarLogHook dbus = myLogHook <+> dynamicLogWithPP (polybarHook dbus)
|
|||
--
|
||||
myLayoutHook = mirrorTiled ||| tiled ||| full
|
||||
where
|
||||
full = layout "Full" Full
|
||||
tiled = layout "Tall" baseTiled
|
||||
mirrorTiled = layout "Mirror Tall" $ Mirror baseTiled
|
||||
full = layout fullLayoutId Full
|
||||
tiled = layout tallLayoutId baseTiled
|
||||
mirrorTiled = layout mirrorTallLayoutId $ Mirror baseTiled
|
||||
|
||||
layout n l = renamed [Replace n] $ avoidStruts . smartBorders . minimize . boringWindows $ l
|
||||
|
||||
|
@ -177,6 +177,10 @@ myLayoutHook = mirrorTiled ||| tiled ||| full
|
|||
gapSpaced g = spacing g . myGaps g
|
||||
myGaps gap = gaps [(U, gap), (D, gap), (L, gap), (R, gap)]
|
||||
|
||||
fullLayoutId = "Full"
|
||||
tallLayoutId = "Tall"
|
||||
mirrorTallLayoutId = "Mirror Tall"
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Startup hook
|
||||
|
||||
|
@ -308,8 +312,8 @@ myKeys conf =
|
|||
layout_kb =
|
||||
[ -- Rotate through the available layout algorithms
|
||||
-- ("M-<Space>", sendMessage NextLayout),
|
||||
("M-<Space>", cycleThroughLayouts ["Full", "Mirror Tall"]),
|
||||
("M-<Tab>", cycleThroughLayouts ["Tall", "Mirror Tall"]),
|
||||
("M-<Space>", cycleThroughLayouts [fullLayoutId, mirrorTallLayoutId]),
|
||||
("M-<Tab>", cycleThroughLayouts [tallLayoutId, mirrorTallLayoutId]),
|
||||
-- Reset the layouts on the current workspace to default
|
||||
("M-S-<Space>", setLayout $ XMonad.layoutHook conf),
|
||||
-- Shrink the master area
|
||||
|
|
Loading…
Reference in a new issue