diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-11 12:38:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | 682e237df7e8b22f820d14a4adee58e6e2f84268 (patch) | |
| tree | 5d888cb46f1a49e89fc55e2a4c232d3af0265b1d /src/builtins.zig | |
| parent | 6878e1c309172d624c0d7a3555f6f0217ae6770e (diff) | |
| download | pardes-682e237df7e8b22f820d14a4adee58e6e2f84268.tar.gz pardes-682e237df7e8b22f820d14a4adee58e6e2f84268.zip | |
trunk: resume before the Reload experiment
Empty marker on the last pre-Reload change. Keep the Reload experiment on reload (3801914), its first change on reload-start (200a1fc), and the unfinished performance investigation on reload-perf-wip.
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index e55a418f..9208b9f8 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -436,6 +436,20 @@ pub const Filter = struct { } }; +/// Switch this terminal between raw program input and normal editor mode. +pub const Togglettymode = struct { + pub fn run(c: Ctx) void { + c.p.toggleTty(c.id); + } +}; + +/// Fold a pane to its tag, or restore its share of the column. +pub const Collapse = struct { + pub fn run(c: Ctx) void { + layout.toggleCollapse(c.p, c.id); + } +}; + pub const Delcol = struct { pub fn run(c: Ctx) void { c.p.removeColumn(c.id) catch |err| c.p.reportError(c.id, "close column", err); @@ -444,7 +458,7 @@ pub const Delcol = struct { /// A shell in the calling pane's directory, raw from the first frame. On every /// pane's tagline: the fast path from wherever you are to a prompt there. -pub const Newtty = struct { +pub const Tty = struct { pub fn run(c: Ctx) void { c.p.spawnTty(c.id); } @@ -509,6 +523,16 @@ pub const EffectCode = struct { } }; +/// An optional SDL workspace-tag companion; never consumes input or text cells. +pub const Pet = struct { + pub const takes_arg = true; + pub const enabled = pardes.platform == .gui; + pub fn run(c: Ctx) void { + const name = std.mem.trim(u8, c.arg orelse return, " \t\r\n"); + c.p.settings.pet = std.meta.stringToEnum(@TypeOf(c.p.settings.pet), name) orelse return; + } +}; + pub const Mini = struct { pub const takes_arg = true; pub const output: OutputTraits = .{ .name = "Mini", .doc = true }; |
