xmonad垂直调整平铺/窗口大小

16

我在左侧有几个垂直堆叠的磁贴,右侧也有一些。我可以轻松地水平调整主窗格(使用mod+lmod+h),但我想在这种设置中垂直调整一些窗口(包括非主窗口)。

如何做到这一点?

1个回答

13

我认为使用标准的XMonad Tall布局无法实现,但是替代布局,例如xmonad-contrib中的ResizableTall支持调整主窗格的大小。

如果使用ResizableTall布局要调整主窗格的大小,请绑定XMonad.Layout.ResizableTile (MirrorShrink, MirrorExpand)消息。

例如,在我的配置文件中,我定义了我的layoutHookkeys使用带有两个主窗格的ResizableTall,并将Mod-M+箭头键绑定到调整主窗格的大小上,使用(简化):

main = xmonad gnomeConfig
  { layoutHook = Full ||| tall ||| Mirror tall
  , keys = myKeys
  }
  where
  -- Two master panes, 1/10th resize increment, only show master
  -- panes by default. Unlike plain 'Tall', this also allows
  -- resizing the master panes, via the 'MirrorShrink' and
  -- 'MirrorExpand' messages.
  tall = ResizableTall 2 (1/10) 1 []
  -- Add bindings for arrow keys that resize master panes.
  myKeys x = M.fromList (newKeys x) `M.union` keys gnomeConfig x
  newKeys conf@(XConfig {XMonad.modMask = modm}) =
    [ ((modm, xK_Left),  sendMessage MirrorExpand)
    , ((modm, xK_Up),    sendMessage MirrorExpand)
    , ((modm, xK_Right), sendMessage MirrorShrink)
    , ((modm, xK_Down),  sendMessage MirrorShrink)
    ]

4
可以确认 ResizableTall 支持垂直调整大小。 - ElDog

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接