diff options
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/config.zig b/src/config.zig index 7908774b..5a9cf070 100644 --- a/src/config.zig +++ b/src/config.zig @@ -17,7 +17,9 @@ pub const Chord = struct { shift: bool = false, }; -// Leader paths apply in body normal mode, not tags or raw terminals. +// Leader paths apply wherever normal mode reads keys: a body's, a tag's +// (column and workspace tags too) and a PDF's, never a raw terminal's +// (normal.zig takes `.leader` for every target). pub const leader: []const Chord = &.{.{ .cp = ' ' }}; pub const leader_help: u8 = '?'; @@ -79,6 +81,7 @@ pub const leader_path = paths: { .Placement = "cp", .BootShell = null, .LookWord = null, + .Pager = null, .Debug = "td", .Msg = null, .Colors = "tc", @@ -752,13 +755,18 @@ 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, + /// 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. + pager: Pager = .pardes, pub const ShaderAnimation = enum { off, on, always }; pub const Placement = enum { acme, pardes }; pub const BootShell = enum { keep, replace }; pub const LookWord = enum { search, list }; + pub const Pager = enum { pardes, off }; /// A setting that is one of a few words, each an enum field of Runtime. - pub const Choice = enum { placement, boot_shell, look_word }; + pub const Choice = enum { placement, boot_shell, look_word, pager }; /// 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 @@ -998,7 +1006,7 @@ pub const Runtime = struct { .{ .word = "MessageDissolve", .action = .{ .message_ms = .dissolve }, .doc = "How long, in milliseconds, a message takes to dissolve." }, .{ .word = "DumpDir", .action = .dump_dir, .doc = "The directory Dump writes to and a relative Restore reads from; bare, the default." }, .{ .word = "Theme", .action = .theme, .doc = "Switch to the named theme." }, - .{ .word = "Shell", .action = .shell, .doc = "The shell new terminals run; bare, the login shell." }, + .{ .word = "Shell", .action = .shell, .doc = "The shell new terminals run; bare, $SHELL if it is executable, else /bin/sh." }, .{ .word = "Font", .action = .font, .availability = .font_picker, .doc = "The body font, by name or path, and its size." }, .{ .word = "TaglineSize", .action = .tagline_size, .availability = .font_picker, .doc = "Scale the tag font, a percentage." }, .{ .word = "WindowOpacity", .action = .window_opacity, .availability = .window_opacity, .doc = "The window's opacity, a percentage." }, @@ -1023,6 +1031,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 = "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." }, }; pub fn find(name: []const u8) ?Setting { @@ -1250,7 +1259,7 @@ pub const Runtime = struct { .grip_width => "50-300 (a percentage)", .tagline_size => std.fmt.comptimePrint("{d}-{d} (a percentage)", .{ tagline_percent_min, tagline_percent_max }), .message_ms => std.fmt.comptimePrint("0-{d} (milliseconds)", .{message_ms_max}), - .shell => "a path of at most 255 bytes; bare, the login shell", + .shell => "a path of at most 255 bytes; bare, $SHELL, else /bin/sh", .dump_dir => std.fmt.comptimePrint("a path of at most {d} bytes; bare, the default", .{limits.host_path_cap}), .shader => "a Shadertoy file's path, or off", .font => "a name or path, :8 to :72 after it (Mono:14)", @@ -1697,6 +1706,7 @@ pub const Runtime = struct { .placement => "pardes", .boot_shell => "replace", .look_word => "list", + .pager => "off", }, .lift => "rim", .motion => "playful", @@ -1766,6 +1776,7 @@ pub const Runtime = struct { .placement => "Placement pardes\n", .boot_shell => "BootShell replace\n", .look_word => "LookWord list\n", + .pager => "Pager off\n", }, .lift => "Lift rim\n", .motion => "Motion playful\n", |
