diff options
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/config.zig b/src/config.zig index fb38e4dd..43d2cfda 100644 --- a/src/config.zig +++ b/src/config.zig @@ -26,6 +26,7 @@ const undecided: []const u8 = "<undecided>"; // null means word/chord-only. Every enabled builtin must explicitly choose a path. pub const leader_path = paths: { + @setEvalBranchQuota(2000); var table = std.EnumArray(Builtin, ?[]const u8).initDefault(@as(?[]const u8, undecided), .{ .Help = &[_]u8{leader_help}, .Hover = "lk", @@ -139,6 +140,9 @@ pub const leader_path = paths: { } if (builtins.capabilities.scene_shaders) { table.set(.Crt, "tr"); + table.set(.Bloom, null); + table.set(.Vignette, null); + table.set(.Grain, null); table.set(.Shader, null); table.set(.ShaderAnimation, null); } @@ -869,8 +873,9 @@ pub const Runtime = struct { 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 }; - /// The bundled post pass, a Shadertoy file in shaders/post/. - pub const Scene = enum { crt }; + /// 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 }; pub const Action = union(enum) { toggle: Toggle, @@ -950,6 +955,9 @@ pub const Runtime = struct { .{ .word = "PanelScramble", .action = .{ .transition = .scramble }, .availability = .panel_transitions }, .{ .word = "PanelType", .action = .{ .transition = .typewriter }, .availability = .panel_transitions }, .{ .word = "Crt", .action = .{ .scene = .crt }, .availability = .scene_shaders }, + .{ .word = "Bloom", .action = .{ .scene = .bloom }, .availability = .scene_shaders }, + .{ .word = "Vignette", .action = .{ .scene = .vignette }, .availability = .scene_shaders }, + .{ .word = "Grain", .action = .{ .scene = .grain }, .availability = .scene_shaders }, .{ .word = "Shader", .action = .shader, .availability = .scene_shaders }, .{ .word = "ShaderAnimation", .action = .shader_animation, .availability = .scene_shaders }, .{ .word = "Placement", .action = .{ .choice = .placement } }, @@ -1678,6 +1686,9 @@ pub const Runtime = struct { }, .scene => |effect| switch (effect) { .crt => "Crt 2\n", + .bloom => "Bloom 2\n", + .vignette => "Vignette 2\n", + .grain => "Grain 2\n", }, .shader => "Shader ~/crt.glsl\n", .shader_animation => "ShaderAnimation always\n", |
