summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/config.zig b/src/config.zig
index 5734cd0c..d4efed0e 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -121,6 +121,7 @@ pub const leader_path = paths: {
if (builtins.capabilities.window_blur) table.set(.WindowBlur, null);
if (builtins.capabilities.ligatures) table.set(.Ligatures, null);
if (builtins.capabilities.lift) table.set(.CursorBlink, null);
+ if (builtins.capabilities.lift) table.set(.SelectionGlow, null);
if (builtins.capabilities.lift) table.set(.Lift, null);
table.set(.Motion, null);
table.set(.InactiveDim, null);
@@ -656,6 +657,9 @@ pub const Runtime = struct {
/// solid while typing and for half a second after, eased at each edge,
/// solid again after ten idle seconds.
cursor_blink: bool = true,
+ /// G9: a soft halo round the selection in the body, fading in over
+ /// 100 ms, a pixel shell's (docs/effects.md).
+ selection_glow: bool = false,
/// How long a message stays after the key or click that dismisses it.
message_linger_ms: u16 = 800,
/// How long its fall into the row takes, easing out (ยง8.1: arriving,
@@ -874,7 +878,7 @@ pub const Runtime = struct {
/// The message timings a setting word sets, each in milliseconds.
pub const MessageTime = enum { linger, fall, dissolve };
- pub const Toggle = enum { colors, wrap, tree_context_tag_style, tag_bottom, debug, focus_tint, syntax_bold, verbose, message_animation, ligatures, cursor_blink };
+ pub const Toggle = enum { colors, wrap, tree_context_tag_style, tag_bottom, debug, focus_tint, syntax_bold, verbose, message_animation, ligatures, cursor_blink, selection_glow };
/// A bundled post pass, a Shadertoy file in shaders/post/: the CRT, and
/// G4's bloom, vignette and grain (docs/effects.md).
pub const Scene = enum { crt, bloom, vignette, grain };
@@ -931,6 +935,7 @@ pub const Runtime = struct {
.{ .word = "MessageAnimation", .action = .{ .toggle = .message_animation } },
.{ .word = "Ligatures", .action = .{ .toggle = .ligatures }, .availability = .ligatures },
.{ .word = "CursorBlink", .action = .{ .toggle = .cursor_blink }, .availability = .lift },
+ .{ .word = "SelectionGlow", .action = .{ .toggle = .selection_glow }, .availability = .lift },
.{ .word = "Lift", .action = .lift, .availability = .lift },
.{ .word = "Motion", .action = .motion },
.{ .word = "InactiveDim", .action = .inactive_dim },
@@ -1006,9 +1011,9 @@ pub const Runtime = struct {
.toggle => |field| if (field == .ligatures) {
if (setting.availability != .ligatures)
@compileError("the ligatures toggle must use the ligatures capability");
- } else if (field == .cursor_blink) {
+ } else if (field == .cursor_blink or field == .selection_glow) {
if (setting.availability != .lift)
- @compileError("CursorBlink must use the lift capability (a pixel shell's)");
+ @compileError("CursorBlink and SelectionGlow must use the lift capability (a pixel shell's)");
} else if (setting.availability != null)
@compileError("unconditional toggles cannot carry a backend capability"),
else => if (setting.availability != null)
@@ -1661,6 +1666,7 @@ pub const Runtime = struct {
.message_animation => "MessageAnimation off\n",
.ligatures => "Ligatures off\n",
.cursor_blink => "CursorBlink off\n",
+ .selection_glow => "SelectionGlow on\n",
},
.shell => "Shell requested (new panes) fish\n",
.tagline_size => "TaglineSize 73\n",