ianyh / Amethyst

Automatic tiling window manager for macOS à la xmonad.
https://ianyh.com/amethyst/
MIT License
14.68k stars 487 forks source link

Shrink/Extend main pane does not work for extended custom layouts #1550

Open Henkru opened 1 year ago

Henkru commented 1 year ago

Describe the bug If a custom layout extends a layout that uses a main pane (e.g. 3Column Middle), then Shrink/Extend main pane & Increase/Decrease main pane count shortcuts do not have any affect.

To Reproduce The following custom layout can be used to reproduce the issue.

function layout() {
  return {
    name: "test",
    extends: "middle-wide",
    getFrameAssignments: (windows, screenFrame, state, extendedFrames) => {
      return extendedFrames.reduce((frames, extendedFrame) => {
        return { ...frames, [extendedFrame.id]: extendedFrame.frame };
      }, {});
    }
  };
}
  1. Load the above custom layout
  2. Try to shrink the main pane

Expected behavior The above custom layout extends the 3Column Middle layout, and the Shrink/Extend main pane & Increase/Decrease main pane count shortcuts should work normally.

Versions:

Debug Info

ersion: 0.20.0 (108)

OS version: Version 13.5 (Build 22G74)

Screens:
    (0.0, 0.0, 5120.0, 1440.0) [(0.0, 0.0, 5120.0, 1440.0)]
    (1910.0, -1080.0, 1920.0, 1080.0) [(1910.0, 1440.0, 1920.0, 1080.0)]

Configuration:
smart-window-margins: 0
new-windows-to-main: 0
mod2: (
    option,
    shift,
    control,
    command
)
float-small-windows: 1
screen-padding-left: 0
mod1: (
    option,
    shift,
    command
)
window-minimum-width: 0
restore-layouts-on-launch: 1
use-canary-build: 0
window-margins: 1
mouse-resizes-windows: 1
floating-is-blacklist: 1
debug-layout-info: 0
enables-layout-hud: 1
follow-space-thrown-windows: 1
ignore-menu-bar: 0
floating: (
)
window-resize-step: 5
window-max-count: 0
enables-layout-hud-on-space-change: 0
layouts: (
    test,
    "middle-wide"
)
screen-padding-bottom: 0
window-minimum-height: 0
screen-padding-right: 0
mouse-swaps-windows: 1
focus-follows-mouse: 0
mouse-follows-focus: 0
screen-padding-top: 0
window-margin-size: 10