diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 07:31:35 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 87ad46cb7e7410c53419c20cef7df53ed4c15f60 (patch) | |
| tree | ddc88864c5a741426d1e7d89097dd56b4586e883 /src/config.zig | |
| parent | 411d0b6059192b75853e220e1242b694ae461a3e (diff) | |
| download | pardes-87ad46cb7e7410c53419c20cef7df53ed4c15f60.tar.gz pardes-87ad46cb7e7410c53419c20cef7df53ed4c15f60.zip | |
G11: HoverGlow, a soft underline of light under a look-hover's word
HoverGlow on|off (off, a pixel shell's; Chrome.glows bit 1, SelectionGlow
bit 0 now that there are two): under the word a look-hover would open (its
cells in the affordance's tint) a strip three logical pixels tall along
its foot, blurred by one, in the theme's accent, at most 22% and under
the text's contrast floor, fading in over 80 ms; kept to the bodies and
split round a cursor. glowBlocks serves G9 and G11. The strip is cast from
a row away so addSoft's caster cut-out misses it.
Tests: the glow comes up by 90 ms and never falls on the cursor's cell.
Gates as G10 (a loaded machine shifted the GUI goldens a scene once; a
rerun matched 01-08). Feel review: .scratch/render/hover/.
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/config.zig b/src/config.zig index 229c70ea..4e159d01 100644 --- a/src/config.zig +++ b/src/config.zig @@ -123,6 +123,7 @@ pub const leader_path = paths: { 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(.HoverGlow, null); if (builtins.capabilities.lift) table.set(.Lift, null); table.set(.Motion, null); table.set(.InactiveDim, null); @@ -670,6 +671,9 @@ pub const Runtime = struct { /// 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, + /// G11: a soft glow under the word a look-hover would open, fading in + /// over 80 ms, a pixel shell's. + hover_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, @@ -893,7 +897,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, selection_glow }; + 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, hover_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 }; @@ -953,6 +957,7 @@ pub const Runtime = struct { .{ .word = "Ligatures", .action = .{ .toggle = .ligatures }, .availability = .ligatures, .doc = "A font's programming ligatures draw across their cells, on or off." }, .{ .word = "CursorBlink", .action = .{ .toggle = .cursor_blink }, .availability = .lift, .doc = "The cursor blinks, solid while typing, on or off." }, .{ .word = "SelectionGlow", .action = .{ .toggle = .selection_glow }, .availability = .lift, .doc = "A soft halo of the selection's colour round it in the body, on or off." }, + .{ .word = "HoverGlow", .action = .{ .toggle = .hover_glow }, .availability = .lift, .doc = "A soft underline of light under the word a look-hover would open, on or off." }, .{ .word = "Lift", .action = .lift, .availability = .lift, .doc = "How the focused pane stands off the page: off, shadow, rim or auto." }, .{ .word = "Motion", .action = .motion, .doc = "How animations move: off, crisp, smooth, bouncy or playful." }, .{ .word = "InactiveDim", .action = .inactive_dim, .doc = "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off." }, @@ -1029,9 +1034,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 or field == .selection_glow) { + } else if (field == .cursor_blink or field == .selection_glow or field == .hover_glow) { if (setting.availability != .lift) - @compileError("CursorBlink and SelectionGlow must use the lift capability (a pixel shell's)"); + @compileError("CursorBlink, SelectionGlow and HoverGlow 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) @@ -1687,6 +1692,7 @@ pub const Runtime = struct { .ligatures => "Ligatures off\n", .cursor_blink => "CursorBlink off\n", .selection_glow => "SelectionGlow on\n", + .hover_glow => "HoverGlow on\n", }, .shell => "Shell requested (new panes) fish\n", .tagline_size => "TaglineSize 73\n", |
