From 62dc7077d46b412b484048b066271a834ef8ed52 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 14 Mar 2023 12:39:55 +0300 Subject: [PATCH] xmonad: rename layouts --- users/modules/window_manager/xmonad_config.hs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/users/modules/window_manager/xmonad_config.hs b/users/modules/window_manager/xmonad_config.hs index e81d440..f9e2012 100644 --- a/users/modules/window_manager/xmonad_config.hs +++ b/users/modules/window_manager/xmonad_config.hs @@ -42,6 +42,7 @@ import XMonad.Layout.LimitWindows (limitWindows) import XMonad.Layout.NoBorders (smartBorders) import XMonad.Layout.Spacing (spacing) import XMonad.Layout.Minimize (minimize) +import XMonad.Layout.Renamed (renamed, Rename (..)) import XMonad.Prompt (XPConfig (..), XPPosition (Top), XPType (..), XPrompt (..), mkComplFunFromList', mkXPromptWithModes) import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -160,11 +161,15 @@ myPolybarLogHook dbus = myLogHook <+> dynamicLogWithPP (polybarHook dbus) -- The available layouts. Note that each layout is separated by |||, -- which denotes layout choice. -- -myLayoutHook = minimize . boringWindows . avoidStruts . smartBorders $ (Mirror tiled ||| tiled ||| full) +myLayoutHook = mirrorTiled ||| tiled ||| full where - full = Full - tiled = gapSpaced 5 $ Tall nmaster incRatio ratio + full = layout "Full" Full + tiled = layout "Tall" baseTiled + mirrorTiled = layout "Mirror Tall" $ Mirror baseTiled + layout n l = renamed [Replace n] $ avoidStruts . smartBorders . minimize . boringWindows $ l + + baseTiled = gapSpaced 5 $ Tall nmaster incRatio ratio nmaster = 1 incRatio = (3 / 100) ratio = (1 / 2) @@ -302,8 +307,9 @@ myKeys conf = layout_kb = [ -- Rotate through the available layout algorithms + -- ("M-", sendMessage NextLayout), ("M-", cycleThroughLayouts ["Full", "Mirror Spacing Tall"]), - ("M-", cycleThroughLayouts ["Spacing Tall", "Mirror Spacing Tall"]), + ("M-", cycleThroughLayouts ["Tall", "Mirror Tall"]), -- Reset the layouts on the current workspace to default ("M-S-", setLayout $ XMonad.layoutHook conf), -- Shrink the master area