summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 20:36:38 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commitd0ba070a87c54c538e5f788485391b0af927d0fb (patch)
tree46dc05d158457b48a9e9b4f2b1fbc07c59e161b0 /src/pardes.zig
parent0485446709e6190ff54264cd0e376fc8b47e3d64 (diff)
downloadpardes-d0ba070a87c54c538e5f788485391b0af927d0fb.tar.gz
pardes-d0ba070a87c54c538e5f788485391b0af927d0fb.zip
boot with a single shell pane (was three). Options.shells (default 1; >=3 gives the classic two-column boot), -n <count> CLI flag. The 26 legacy snap scripts pin -n 3 on their start line so their coordinates and goldens stay valid; boot.snap tests the new default (golden regenerated: one full-width pane). 28/28 green.
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 7fe4d95f..9842362f 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -601,6 +601,8 @@ const Rect = struct { x: u16, y: u16, w: u16, h: u16 };
pub const Options = struct {
tty_only: bool = false,
+ /// initial shell panes: 1 (default) or 3 for the classic two-column boot
+ shells: u8 = 1,
tty_toggle: u21 = 'b',
/// load a dump of another instance instead of spawning shells (acme -l)
load_path: ?[]const u8 = null,
@@ -676,8 +678,8 @@ pub const Pardes = struct {
p.ncol = 1;
p.col_n[0] = 1;
p.col_terms[0][0] = 0;
- } else {
- // editor default: two columns, the left one split in two.
+ } else if (opts.shells >= 3) {
+ // classic layout: two columns, the left one split in two.
_ = try p.newPane(0);
_ = try p.newPane(1);
_ = try p.newPane(2);
@@ -688,6 +690,13 @@ pub const Pardes = struct {
p.col_terms[0][1] = 1;
p.col_n[1] = 1;
p.col_terms[1][0] = 2;
+ } else {
+ // ponytail: 1 and 3 are the only boot layouts; anything else acts as 1
+ _ = try p.newPane(0);
+ p.panes[0].?.greet = true;
+ p.ncol = 1;
+ p.col_n[0] = 1;
+ p.col_terms[0][0] = 0;
}
p.sync();
return p;