From d7dfeb35fdafc529ec1df7e473ec7d4e76965538 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 14 Mar 2023 12:53:08 +0300 Subject: [PATCH] xmonad: add constansts for layout ids --- users/modules/window_manager/xmonad_config.hs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/users/modules/window_manager/xmonad_config.hs b/users/modules/window_manager/xmonad_config.hs index fad67ff..d16c056 100644 --- a/users/modules/window_manager/xmonad_config.hs +++ b/users/modules/window_manager/xmonad_config.hs @@ -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-", sendMessage NextLayout), - ("M-", cycleThroughLayouts ["Full", "Mirror Tall"]), - ("M-", cycleThroughLayouts ["Tall", "Mirror Tall"]), + ("M-", cycleThroughLayouts [fullLayoutId, mirrorTallLayoutId]), + ("M-", cycleThroughLayouts [tallLayoutId, mirrorTallLayoutId]), -- Reset the layouts on the current workspace to default ("M-S-", setLayout $ XMonad.layoutHook conf), -- Shrink the master area