diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index dd1c6ffc..77481697 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -3,7 +3,6 @@ import XMonad import XMonad.Actions.CopyWindow -import XMonad.Actions.PerWorkspaceKeys import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog @@ -15,16 +14,19 @@ 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.IfMax import XMonad.Layout.LimitWindows -import XMonad.Layout.Maximize +import XMonad.Layout.Magnifier hiding (Toggle) +import qualified XMonad.Layout.Magnifier as Mag import XMonad.Layout.NoBorders import XMonad.Layout.PerWorkspace +import XMonad.Layout.Reflect +import XMonad.Layout.Reflect.Message import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing -import XMonad.Layout.ThreeColumns import XMonad.Layout.ToggleLayouts import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -70,18 +72,20 @@ main = myLayout = avoidStruts $ smartBorders + $ onWorkspace researchWS (ifMaxToggle 2 grid accordion) $ onWorkspace chatWS (ifMaxToggle 2 grid accordion) $ onWorkspace multimediaWS (ifMaxToggle 2 grid accordion) - -- Magifier doesn't work well with threecol's slaves - -- Full has the property of "only maximizing the focused one" - -- Maximize can have a window maximized but not focused, might be useful when programming - $ maximizeWithPadding 0 threecol + $ toggleLayouts (focusTracking Full) (mag tallr) where ifMaxToggle n tog l = ifMax n l (toggleLayouts tog l) - threecol = - renamed [ Replace "3Col" ] - $ smartSpacingWithEdge 5 - $ ThreeColMid 1 (3/100) (1/2) + + 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" ] @@ -294,11 +298,8 @@ keybinds = , ((superMask, xK_period ), sendMessage Expand ) , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) - , ((superMask , xK_space ), chooseAction $ \ws -> - if ws == chatWS then sendMessage ToggleLayout - else if ws == multimediaWS then sendMessage ToggleLayout - else withFocused (sendMessage . maximizeRestore) - ) + , ((superMask , xK_apostrophe), sendMessage Mag.Toggle ) + , ((superMask , xK_space ), sendMessage ToggleLayout ) -- [D]o sink and lift , ( (superMask, xK_d) @@ -367,6 +368,9 @@ altMask = mod1Mask myWorkspaces :: [WorkspaceId] myWorkspaces = map (:[]) $ take 8 greekLower +researchWS :: WorkspaceId +researchWS = myWorkspaces !! 2 + chatWS :: WorkspaceId chatWS = myWorkspaces !! 3