diff options
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/src/config.zig b/src/config.zig index e96d73be..a703f79e 100644 --- a/src/config.zig +++ b/src/config.zig @@ -124,6 +124,13 @@ 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(.Occlusion, null); + if (builtins.capabilities.lift) table.set(.Parallax, null); + if (builtins.capabilities.lift) table.set(.Afterglow, null); + table.set(.JumpTrail, null); + table.set(.ChipShadow, null); + table.set(.ThumbFlash, null); if (builtins.capabilities.lift) table.set(.Lift, null); table.set(.Motion, null); table.set(.InactiveDim, null); @@ -673,6 +680,27 @@ 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, + /// G12: pane bodies darken faintly toward their edges (ambient + /// occlusion, at most 2%), a pixel shell's. + occlusion: bool = false, + /// G13: a theme's page pattern under the bodies (lapis's dots) moves + /// with the text at a quarter of its speed, a pixel shell's. + parallax: bool = false, + /// G14: text that changes glows for a moment in the theme's accent and + /// fades, a pixel shell's. + afterglow: bool = false, + /// T2: in a terminal, a jump of the cursor leaves a short trail that + /// fades in 120 ms (a truecolor terminal's; a pixel shell glides). + jump_trail: bool = false, + /// T1: in a terminal, a notice chip casts a cell's shadow right and + /// down (truecolor terminals). + chip_shadow: bool = false, + /// T7: in a terminal, a pane's scroll thumb brightens as it scrolls and + /// fades back (truecolor terminals). + thumb_flash: 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, @@ -896,7 +924,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, occlusion, parallax, afterglow, jump_trail, chip_shadow, thumb_flash }; /// 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 }; @@ -956,6 +984,13 @@ 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 = "Occlusion", .action = .{ .toggle = .occlusion }, .availability = .lift, .doc = "Pane bodies darken faintly toward their edges, on or off." }, + .{ .word = "Parallax", .action = .{ .toggle = .parallax }, .availability = .lift, .doc = "A theme's page pattern moves with the text at a quarter of its speed, on or off." }, + .{ .word = "Afterglow", .action = .{ .toggle = .afterglow }, .availability = .lift, .doc = "Text that changes glows for a moment and fades, on or off." }, + .{ .word = "JumpTrail", .action = .{ .toggle = .jump_trail }, .doc = "In a terminal, a jump of the cursor leaves a short trail that fades, on or off." }, + .{ .word = "ChipShadow", .action = .{ .toggle = .chip_shadow }, .doc = "In a terminal, a notice chip casts a cell's shadow right and down, on or off." }, + .{ .word = "ThumbFlash", .action = .{ .toggle = .thumb_flash }, .doc = "In a terminal, a pane's scroll thumb brightens as it scrolls and fades back, 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." }, @@ -985,7 +1020,7 @@ pub const Runtime = struct { .{ .word = "Bloom", .action = .{ .scene = .bloom }, .availability = .scene_shaders, .doc = "The brightest ink glows a little: a level, 0 (off) through 3." }, .{ .word = "Vignette", .action = .{ .scene = .vignette }, .availability = .scene_shaders, .doc = "The window's corners fall into shade: a level, 0 (off) through 3." }, .{ .word = "Grain", .action = .{ .scene = .grain }, .availability = .scene_shaders, .doc = "The page takes a fine, still grain, like paper: a level, 0 (off) through 3." }, - .{ .word = "Shader", .action = .shader, .availability = .scene_shaders, .doc = "A Shadertoy file into the post chain, or out of it; off empties the chain." }, + .{ .word = "Shader", .action = .shader, .availability = .scene_shaders, .doc = "A Shadertoy file into the post chain, or out of it, compiled again when saved; off empties the chain." }, .{ .word = "ShaderAnimation", .action = .shader_animation, .availability = .scene_shaders, .doc = "When the post chain animates on its own: off, on (while focused) or always." }, .{ .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." }, @@ -1032,9 +1067,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 or field == .occlusion or field == .parallax or field == .afterglow) { if (setting.availability != .lift) - @compileError("CursorBlink and SelectionGlow must use the lift capability (a pixel shell's)"); + @compileError("CursorBlink, SelectionGlow, HoverGlow, Occlusion, Parallax and Afterglow 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) @@ -1690,6 +1725,13 @@ pub const Runtime = struct { .ligatures => "Ligatures off\n", .cursor_blink => "CursorBlink off\n", .selection_glow => "SelectionGlow on\n", + .hover_glow => "HoverGlow on\n", + .occlusion => "Occlusion on\n", + .parallax => "Parallax on\n", + .afterglow => "Afterglow on\n", + .jump_trail => "JumpTrail on\n", + .chip_shadow => "ChipShadow on\n", + .thumb_flash => "ThumbFlash on\n", }, .shell => "Shell requested (new panes) fish\n", .tagline_size => "TaglineSize 73\n", |
