diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 0e1d277a..a1b0ace7 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -13,10 +13,8 @@ import XMonad.Hooks.ManageHelpers import XMonad.Hooks.OnPropertyChange import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar -import XMonad.Layout.Accordion import XMonad.Layout.FocusTracking -import XMonad.Layout.Grid -import XMonad.Layout.LimitWindows +import XMonad.Layout.IfMax import XMonad.Layout.Magnifier hiding (Toggle) import qualified XMonad.Layout.Magnifier as Mag import XMonad.Layout.NoBorders @@ -71,31 +69,24 @@ main = myLayout = avoidStruts $ smartBorders - $ onWorkspace researchWS (toggleLayouts grid accordion) - $ onWorkspace chatWS (toggleLayouts grid accordion) - $ onWorkspace multimediaWS (toggleLayouts grid accordion) - $ toggleLayouts (focusTracking Full) (mag tallr) + $ onWorkspace researchWS (toggleLayouts (magnifier tallr) full) + $ onWorkspace chatWS (toggleLayouts (magnifier tallr) full) + $ onWorkspace multimediaWS (toggleLayouts (magnifier tallr) full) + $ toggleLayouts (magnifier tallr) full where + full = focusTracking Full + + tallrN n = + smartSpacingWithEdge 5 + $ reflectMsg . reflectHoriz + $ ResizableTall n (1/10) (3/7) [] + tallr = renamed [ Replace "Tall" ] - $ smartSpacingWithEdge 5 - $ reflectMsg . reflectHoriz - $ ResizableTall 1 (1/10) (3/7) [] - - mag = magnifyxy 1.05 1.3 (NoMaster 3) False - - grid = - renamed [ Replace "Grid" ] - $ smartSpacingWithEdge 5 - $ Grid - - accordion = - renamed [ Replace "Accordion" ] - $ smartSpacingWithEdge 5 - $ limitSlice 3 - $ reflectHoriz - $ Mirror - $ Accordion + $ ifMax 3 (tallrN 1) + $ ifMax 5 (tallrN 2) + $ ifMax 7 (tallrN 3) + $ tallrN 4 isSioyek :: Query Bool isSioyek = className =? "sioyek" @@ -291,8 +282,6 @@ keybinds = , ((0, xF86XK_AudioNext), spawn "playerctl next" ) -- Resize windows - , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) - , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) , ((superMask, xK_comma ), sendMessage Shrink ) , ((superMask, xK_period ), sendMessage Expand ) , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink )