From 31f45fdff8850259b6fd471aa504d5ce7307e3c6 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sun, 4 Jun 2023 14:49:51 +0200 Subject: [PATCH] Adapt layout to screen width --- .xmonad/xmonad.hs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 2633fe8..ab87c0d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -105,12 +105,19 @@ myManageHook = -- layoutHook myLayoutHook = showWName' myShowWNameConfig $ - t ||| -- Tiled layouts - c3 ||| -- Column layouts - c3m ||| -- - f -- Monocle layouts + ifWider smallWidth ( + t ||| -- Tiled layouts + c3 ||| -- Column layouts + c3m ||| -- + f -- Monocle layouts + ) ( + t ||| -- Tiled layouts + f -- Monocle layouts + ) where - t = renamed [Replace "[]+"] $ centeredIfSingle 0.8 0.9 $ Tall nmaster delta ratio + smallWidth = 1920 + t = renamed [Replace "[]+"] $ ifWider smallWidth (centeredIfSingle 0.8 0.9 $ Tall nmaster delta ratio) + (Tall nmaster delta ratio) c3 = renamed [Replace "|||"] $ ThreeCol nmaster delta ratio c3m = renamed [Replace "[|]"] $ ThreeColMid nmaster delta ratio f = renamed [Replace "[+]"] Full