summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-24 10:56:05 -0300
committerGabriel Schneider <[email protected]>2026-08-25 09:42:07 -0300
commitc3d0b84b7961ae26d2d654e7120821cc2d83d20d (patch)
tree0b9a060a8ff0ee7d83c8df5ca797a99e0d66c53e /src/config.zig
parent70bde600793ea70bd68832018a154671c6bf1512 (diff)
downloadpardes-c3d0b84b7961ae26d2d654e7120821cc2d83d20d.tar.gz
pardes-c3d0b84b7961ae26d2d654e7120821cc2d83d20d.zip
host: the core owns the event loop; every platform becomes a vtable of optional methods
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig41
1 files changed, 37 insertions, 4 deletions
diff --git a/src/config.zig b/src/config.zig
index a01db954..685d083a 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -131,14 +131,17 @@ pub const leader_path = paths: {
// New here, which frees `w` for the window group (SPC w h/j/k/l).
.Save = "fs",
.New = "fn",
+ .Newtty = "nt",
.Find = "ff",
.Grep = "fg",
// the config FILE joins the file group: `SPC f c` says where pardes
// read (or would read) its startup commands from.
.Config = "fc",
.Tutor = "ht",
+ .Changelog = "hc",
.Newcol = "cn",
.Delcol = "cd",
+ .Joincol = "cj",
.Debug = "td",
// `Msg` takes the text to post, so it has no path, for the reason
// `Theme` and the two acme verbs below have none: a key path names a
@@ -336,6 +339,28 @@ pub const tty_toggle_default: u21 = 'b';
/// means what Escape always means.
pub const tty_toggle_alt: []const Chord = &.{.{ .cp = Key.escape, .shift = true }};
+/// Paste INTO the program a tty pane is running. `SPC p` and the acme 1-3
+/// chord cannot be reached there — the pty owns every keystroke and every
+/// button — so raw tty mode needs its own pair, and these are the two a
+/// terminal user already has in their hands.
+///
+/// The split is the one the whole clipboard design rests on: Ctrl-V types the
+/// DEFAULT register (what `y` put there, no round trip, no desktop involved),
+/// Ctrl-Shift-V asks for the SYSTEM clipboard. Two spellings for the second
+/// because a host may or may not fold the shift into the codepoint, and it
+/// must be tested BEFORE the first: `hit` ignores an unasked shift, so plain
+/// Ctrl-V matches a shifted key too.
+///
+/// What this TAKES: forwardKey encoded both as the same byte, 0x16, so
+/// Ctrl-Shift-V was a duplicate ^V and costs nothing to claim. Ctrl-V was
+/// readline's quoted-insert, and that one is now unreachable in a tty pane —
+/// the trade a terminal user expects, and one line to give back.
+pub const tty_paste: []const Chord = &.{.{ .cp = 'v', .ctrl = true }};
+pub const tty_paste_clipboard: []const Chord = &.{
+ .{ .cp = 'v', .ctrl = true, .shift = true },
+ .{ .cp = 'V', .ctrl = true },
+};
+
/// What LEAVING raw tty mode hides on the shell's prompt rows.
///
/// A prompt is CHROME. `user@host ~/src $` is redrawn on every keystroke, says
@@ -381,16 +406,16 @@ pub const tty_blank: enum { prompt, prompt_and_input } = .prompt;
// thing that would tell you the leader exists, is exactly what you cannot
// press. Row 0 is not a pane, so a middle-click on it is dispatched before any
// pane's mode is consulted: Help works in tty mode, which earns its width.
-pub const topbar_str = "New Newcol Find Grep Help Tutor Dump NextColor Debug Kill";
+pub const topbar_str = "New Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill";
/// the default editable tail of a pane's tag, per kind (an output buffer has
/// no file to Save, so it gets the plain one). Terminals alone expose Filter,
/// the pane-local theme-keyed colour projection. Save stays first on real
/// files: `:` parks at the tail boundary, so the established `:w<Tab>`
/// spelling still walks to Save while New remains visible on every pane.
-pub const pane_builtins_str = "New Del";
-pub const file_pane_builtins_str = "Save New Del";
-pub const terminal_pane_builtins_str = "New Del Filter";
+pub const pane_builtins_str = "New Newtty Del";
+pub const file_pane_builtins_str = "Save New Newtty Del";
+pub const terminal_pane_builtins_str = "New Newtty Del Filter";
/// Columns kept clear to the RIGHT of a tagline's builtins. The path stays at
/// the left edge and the builtins are pushed over to end this far short of the
@@ -719,6 +744,10 @@ pub const find_marker = " Find /";
pub const grep_marker = " Grep /";
pub const rename_marker = " Rename /";
pub const symbol_marker = " WsSymbols /";
+/// Save on a scratch buffer or a terminal: the tail is the whole PATH to write
+/// (no `/` separator, since a path is made of them), prefilled with the pane's
+/// directory so only a filename need be typed.
+pub const save_marker = " Save ";
/// helix `s` / `S`. The only two markers whose word is NOT a builtin — there
/// is no Select/Split command to run from a tag, they name the key that armed
/// the input so the tag still reads as what it is about to do. They also mark
@@ -744,6 +773,10 @@ pub const fonts_buffer = "+Fonts";
pub const pdf_sections_buffer = "+PdfSections";
pub const hover_buffer = "+Hover";
pub const lsp_buffer = "+Lsp";
+pub const changelog_buffer = "+Changelog";
+/// The empty buffer New and Newcol open: no file behind it yet, so Save asks
+/// for a path (prefilled with the inherited directory).
+pub const scratch_buffer = "+New";
// ============================================================================
// PART 3 — THE HELIX KEYMAP. READ THIS BEFORE RETARGETING ANYTHING BELOW.