summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/config.zig b/src/config.zig
index bea5dbbf..edfaf3ed 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -123,11 +123,7 @@ pub const leader_path = paths: {
.JumpScope = null,
.Debug = "td",
.Msg = null,
- .Colors = "tc",
- .FocusTint = null,
- .SyntaxBold = null,
.Verbose = null,
- .TreeContextTagStyle = null,
.Wrap = "tw",
.NextColor = "tn",
.Themes = "tt",
@@ -160,7 +156,6 @@ pub const leader_path = paths: {
table.set(.DumpDir, null);
if (builtins.capabilities.window_opacity) table.set(.WindowOpacity, null);
if (builtins.capabilities.window_blur) table.set(.WindowBlur, null);
- if (builtins.capabilities.ligatures) table.set(.Ligatures, null);
if (builtins.capabilities.pixels) table.set(.CursorBlink, null);
table.set(.JumpTrail, null);
table.set(.ProgramEsc, null);
@@ -687,19 +682,12 @@ pub const kill_to_line_end: []const Chord = &.{.{ .cp = 'k', .ctrl = true }};
pub const Runtime = struct {
theme: usize = 0,
- colors: bool = true,
wrap: bool = true,
- tree_context_tag_style: bool = true,
debug: bool = false,
- focus_tint: bool = true,
/// The workspace tag row. Native shells with their own chrome (the macOS
/// menu bar) turn it off and carry its commands there instead; the core
/// keeps the row as the acme tradition everywhere else.
workspace_tag: bool = true,
- syntax_bold: bool = false,
- /// A font's programming ligatures (`->`, `!=`) draw across their cells.
- /// Only a shell that shapes text has the setting (`Capabilities.ligatures`).
- ligatures: bool = true,
/// How far the unfocused panes' text fades toward its ground, a percent
/// (0 off), kept above the pair's own contrast or 4.5, whichever is
/// lower: a setting alone, which the window draws (gui.zig's Dim) and a
@@ -850,8 +838,6 @@ pub const Runtime = struct {
tagline_font_size: bool,
window_opacity: bool = false,
window_blur: bool = false,
- /// The shell shapes text, so it can draw ligatures and stop drawing them.
- ligatures: bool = false,
/// The shell draws its own pixels (the SDL window): the grip at
/// GripWidth, its own cursor blink, the Pet.
pixels: bool = false,
@@ -859,7 +845,7 @@ pub const Runtime = struct {
pub const Capability = std.meta.FieldEnum(Capabilities);
- pub const Toggle = enum { colors, wrap, tree_context_tag_style, debug, focus_tint, syntax_bold, pager_color, verbose, ligatures, cursor_blink, jump_trail, program_esc };
+ pub const Toggle = enum { wrap, debug, pager_color, verbose, cursor_blink, jump_trail, program_esc };
pub const Action = union(enum) {
toggle: Toggle,
@@ -904,7 +890,6 @@ pub const Runtime = struct {
.window_blur => .window_blur,
.grip_width => .pixels,
.toggle => |field| switch (field) {
- .ligatures => .ligatures,
.cursor_blink => .pixels,
else => null,
},
@@ -915,14 +900,9 @@ pub const Runtime = struct {
// The builtin registry and DumpConfig report share this command table.
pub const settings = [_]Setting{
- .{ .word = "Colors", .action = .{ .toggle = .colors }, .doc = "Syntax colours in text panes, on or off." },
.{ .word = "Wrap", .action = .{ .toggle = .wrap }, .doc = "Long lines wrap onto the next row, on or off." },
- .{ .word = "TreeContextTagStyle", .action = .{ .toggle = .tree_context_tag_style }, .doc = "A pane's TreeContext rows draw in the tag's style, on or off." },
.{ .word = "Debug", .action = .{ .toggle = .debug }, .doc = "A small box of frame statistics at the top right, on or off." },
- .{ .word = "FocusTint", .action = .{ .toggle = .focus_tint }, .doc = "The focused pane's and column's tags are tinted, on or off." },
- .{ .word = "SyntaxBold", .action = .{ .toggle = .syntax_bold }, .doc = "Keywords and the like are drawn bold, on or off." },
.{ .word = "Verbose", .action = .{ .toggle = .verbose }, .doc = "A builtin says its own name on the message row as it runs, on or off." },
- .{ .word = "Ligatures", .action = .{ .toggle = .ligatures }, .doc = "A font's programming ligatures draw across their cells, on or off." },
.{ .word = "CursorBlink", .action = .{ .toggle = .cursor_blink }, .doc = "The cursor blinks, solid while typing, on or off." },
.{ .word = "JumpTrail", .action = .{ .toggle = .jump_trail }, .doc = "A jump of the cursor leaves a short trail that fades, on or off." },
.{ .word = "ProgramEsc", .action = .{ .toggle = .program_esc }, .doc = "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them." },
@@ -1238,8 +1218,8 @@ pub const Runtime = struct {
test "simple setting application mutates only its plain field" {
var state: Runtime = .{};
- try std.testing.expect(apply(&state, find("Colors").?, null));
- try std.testing.expect(!state.colors);
+ try std.testing.expect(apply(&state, find("Wrap").?, null));
+ try std.testing.expect(!state.wrap);
try std.testing.expect(apply(&state, find("Shell").?, " fish\n"));
try std.testing.expectEqualStrings("fish", state.shell.requested.get());
try std.testing.expect(state.shell.pending);
@@ -1346,7 +1326,6 @@ pub const Runtime = struct {
.tagline_font_size = true,
.window_opacity = true,
.window_blur = true,
- .ligatures = true,
.pixels = true,
},
.state = &state,
@@ -1399,7 +1378,7 @@ pub const Runtime = struct {
try writeReport(&out, defaults_context);
const defaults_report = storage[0..out.end];
// A setting this shell does not have reads so, as a comment.
- for ([_][]const u8{ "# WindowOpacity unsupported\n", "# WindowBlur unsupported\n", "# Font unsupported\n", "# TaglineSize unsupported\n", "# Ligatures unsupported\n" }) |expected|
+ for ([_][]const u8{ "# WindowOpacity unsupported\n", "# WindowBlur unsupported\n", "# Font unsupported\n", "# TaglineSize unsupported\n" }) |expected|
try std.testing.expect(std.mem.indexOf(u8, defaults_report, expected) != null);
try std.testing.expect(std.mem.indexOf(u8, defaults_report, "Font in use") == null);
// Every line before the blank one is a ctl word and its value, or a