feat(layout): reduce default MAM_MIN_PANE_COLS to 40 for single workspace 2xK multi-pane tiling
This commit is contained in:
@@ -70,7 +70,7 @@ def extract_panes(data: Dict[str, Any]) -> List[PaneInfo]:
|
||||
|
||||
def compute_2xk_layout(
|
||||
data: Dict[str, Any],
|
||||
min_cols: int = 60,
|
||||
min_cols: int = 40,
|
||||
min_rows: int = 20,
|
||||
max_columns: Optional[int] = None,
|
||||
default_anchor_id: Optional[str] = None
|
||||
@@ -176,7 +176,7 @@ def _env_int(*names: str, default: Optional[int] = None) -> Optional[int]:
|
||||
"""First *valid* int among the env vars in *names*, else `default`.
|
||||
|
||||
`default` is an explicit parameter rather than an `or` at the call site so a
|
||||
legitimate 0 survives (MAM_MIN_PANE_COLS=0 means 0, not the 60 default).
|
||||
legitimate 0 survives (MAM_MIN_PANE_COLS=0 means 0, not the 40 default).
|
||||
|
||||
An unparsable value is skipped rather than raised or treated as terminal: a
|
||||
typo in an operator's shell must not take the whole layout call down (lib.sh
|
||||
@@ -198,7 +198,7 @@ def _env_int(*names: str, default: Optional[int] = None) -> Optional[int]:
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Compute 2xK grid TUI layout split direction")
|
||||
parser.add_argument("--min-cols", type=int, default=_env_int("MAM_MIN_COLS", "MAM_MIN_PANE_COLS", default=60))
|
||||
parser.add_argument("--min-cols", type=int, default=_env_int("MAM_MIN_COLS", "MAM_MIN_PANE_COLS", default=40))
|
||||
parser.add_argument("--min-rows", type=int, default=_env_int("MAM_MIN_ROWS", "MAM_MIN_PANE_ROWS", default=20))
|
||||
parser.add_argument("--max-cols", type=int, default=_env_int("MAM_MAX_COLS", "MAM_MAX_PANE_COLS"))
|
||||
parser.add_argument("--sample-pane", type=str, default=None)
|
||||
|
||||
Reference in New Issue
Block a user