summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/config.zig b/src/config.zig
index f83e7945..45deb7bb 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -81,6 +81,7 @@ pub const leader_path = paths: {
.Placement = "cp",
.BootShell = null,
.LookWord = null,
+ .DirLook = null,
.Pager = null,
.PagerColor = null,
.TermImages = null,
@@ -296,6 +297,8 @@ pub const pdf_pane_builtins_str = "Tty PdfSections PdfTint Collapse Del";
pub const file_pane_builtins_str = "Save Tty Collapse Del";
pub const terminal_pane_builtins_str = "Tty Save Mode Filter Collapse Del";
pub const command_pane_builtins_str = "Kill Save Collapse Del";
+/// A directory pane's (Dir.zig): Get reads it again, as acme's does.
+pub const dir_pane_builtins_str = "Get Tty Collapse Del";
// Each mode badge is one codepoint.
pub const tag_normal = " ";
@@ -774,6 +777,9 @@ pub const Runtime = struct {
/// next place in that pane, wrapping; `list`, what pardes did before,
/// lists every place in a +Search pane (look.zig, lookWord).
look_word: LookWord = .search,
+ /// A directory looked at: `pane`, acme's, a pane listing it (Dir.zig);
+ /// `terminal`, what pardes did before, `ls` in a terminal there.
+ dir_look: DirLook = .pane,
/// What a terminal's shell pages through (host_io.ChildEnv): `pardes`,
/// PAGER and GIT_PAGER set to `pardes -`, a +Pager pane, where the
/// user's environment set neither; `off`, the environment as it is.
@@ -790,10 +796,11 @@ pub const Runtime = struct {
pub const Placement = enum { acme, pardes };
pub const BootShell = enum { keep, replace };
pub const LookWord = enum { search, list };
+ pub const DirLook = enum { pane, terminal };
pub const Pager = enum { pardes, off };
pub const TermImages = enum { real, petscii };
/// A setting that is one of a few words, each an enum field of Runtime.
- pub const Choice = enum { placement, boot_shell, look_word, pager, term_images };
+ pub const Choice = enum { placement, boot_shell, look_word, dir_look, pager, term_images };
/// shadow: a soft drop shadow. rim: a light hairline along the top of
/// the focused pane's tag rows. auto: a shadow on a light page; on a
@@ -1058,6 +1065,7 @@ pub const Runtime = struct {
.{ .word = "Placement", .action = .{ .choice = .placement }, .doc = "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules." },
.{ .word = "BootShell", .action = .{ .choice = .boot_shell }, .doc = "A document dropped where a lone untouched shell stands: keep the shell, or replace it." },
.{ .word = "LookWord", .action = .{ .choice = .look_word }, .doc = "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search." },
+ .{ .word = "DirLook", .action = .{ .choice = .dir_look }, .doc = "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there." },
.{ .word = "Pager", .action = .{ .choice = .pager }, .doc = "What a terminal's commands page through: pardes, a +Pager pane (pardes -), or off, the environment's own; for terminals started after it." },
.{ .word = "PagerColor", .action = .{ .toggle = .pager_color }, .doc = "A +Pager keeps its program's colours, on or off; for the next text paged." },
.{ .word = "TermImages", .action = .{ .choice = .term_images }, .doc = "How a new terminal draws its program's kitty graphics: real, as pixels where it can, or petscii, as glyph art." },
@@ -1745,6 +1753,7 @@ pub const Runtime = struct {
.placement => "pardes",
.boot_shell => "replace",
.look_word => "list",
+ .dir_look => "terminal",
.pager => "off",
.term_images => "petscii",
},
@@ -1817,6 +1826,7 @@ pub const Runtime = struct {
.placement => "Placement pardes\n",
.boot_shell => "BootShell replace\n",
.look_word => "LookWord list\n",
+ .dir_look => "DirLook terminal\n",
.pager => "Pager off\n",
.term_images => "TermImages petscii\n",
},
@@ -2188,7 +2198,7 @@ const doc_typ = struct {
if (w.end > 0) w.writeByte(' ') catch return false;
w.writeAll(x[0 .. std.mem.indexOfScalar(u8, x, '+') orelse x.len]) catch return false;
}
- const tags = [_][]const u8{ topbar_str, @import("tagline.zig").column_tag_default, pane_builtins_str, pdf_pane_builtins_str, file_pane_builtins_str, terminal_pane_builtins_str, command_pane_builtins_str };
+ const tags = [_][]const u8{ topbar_str, @import("tagline.zig").column_tag_default, pane_builtins_str, pdf_pane_builtins_str, file_pane_builtins_str, terminal_pane_builtins_str, command_pane_builtins_str, dir_pane_builtins_str };
for (tags) |d| if (std.mem.eql(u8, d, w.buffered())) return true;
return false;
}