summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 10:46:03 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:12:36 -0300
commit11204e1206f7f7ffeaa861c1a442a312e563d3ed (patch)
treef788736bf5b6a56694563b664b5db73bc54bff72 /src/builtins.zig
parentc9b9dad8469f5d654c31d688d7e2d93da8325f39 (diff)
downloadpardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.tar.gz
pardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.zip
effects out, the post chain: Crt, Bloom, Vignette, Grain, Shader and ShaderAnimation go with src/gui/Post.zig, src/ShaderBuild.zig (the run-time glslc spawn and its watched files), shaders/post/, post.vert, bloom-down and bloom-up and their prebuilt .spv, the window's scene texture and its post-chain-only redraw (level A), the disable_scene_effects tape site and Pardes.disableSceneEffects; EffectCode goes with src/effect_sources.zig, which only embedded the effects' sources (/virtual keeps src/); the corner-click test keeps its point without a chain, the window monkey loses its Bloom axis; macOS's post-processor (ScenePostprocessor.swift, crt.ci.metal, pardes_scene) is a change of its own
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index 0295130d..c7b427f5 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -18,7 +18,6 @@ const limits = @import("memory.zig").limits;
pub const frontend: config.Runtime.Capabilities = .{
.font_picker = pardes.font_picker,
.panel_transitions = true,
- .scene_shaders = pardes.platform == .gui or pardes.platform == .macos,
// The tty's font belongs to its emulator.
.tagline_font_size = pardes.platform != .tui,
.window_opacity = pardes.platform == .gui or pardes.platform == .macos,
@@ -35,8 +34,8 @@ pub const frontend: config.Runtime.Capabilities = .{
/// its own frontend does (`viewCapabilities`), so a terminal's replica of a
/// window's session steps as the window's own does, and back.
pub const desktop = pardes.platform == .tui or pardes.platform == .gui;
-const window_capabilities: config.Runtime.Capabilities = .{ .font_picker = true, .panel_transitions = true, .scene_shaders = true, .tagline_font_size = true, .window_opacity = true, .window_blur = false, .ligatures = true, .lift = true };
-const terminal_capabilities: config.Runtime.Capabilities = .{ .font_picker = false, .panel_transitions = true, .scene_shaders = false, .tagline_font_size = false, .window_opacity = false, .window_blur = false, .ligatures = false, .lift = false };
+const window_capabilities: config.Runtime.Capabilities = .{ .font_picker = true, .panel_transitions = true, .tagline_font_size = true, .window_opacity = true, .window_blur = false, .ligatures = true, .lift = true };
+const terminal_capabilities: config.Runtime.Capabilities = .{ .font_picker = false, .panel_transitions = true, .tagline_font_size = false, .window_opacity = false, .window_blur = false, .ligatures = false, .lift = false };
/// The words this build has: a desktop build's are the window's.
pub const capabilities: config.Runtime.Capabilities = if (desktop) window_capabilities else frontend;
@@ -245,8 +244,8 @@ pub const registry = struct {
if (@backingInt(b) == i) return switch (setting.action) {
// a switch flips bare, a choice steps, and DumpDir and Shell bare
// are the default
- .toggle, .transition, .scene, .dump_dir, .choice, .lift, .shader_animation, .motion, .shell => false,
- .theme, .font, .tagline_size, .window_opacity, .window_blur, .message_ms, .shader, .inactive_dim, .grip_width => true,
+ .toggle, .transition, .dump_dir, .choice, .lift, .motion, .shell => false,
+ .theme, .font, .tagline_size, .window_opacity, .window_blur, .message_ms, .inactive_dim, .grip_width => true,
// bare, it says the current value (exec.applySettingBuiltin)
.tab, .callstack_depth, .search_rows => false,
};
@@ -277,14 +276,12 @@ pub const registry = struct {
}
};
-test "capabilities exactly gate setting and effect-source builtins" {
+test "capabilities exactly gate setting builtins" {
const Builtin = registry.Builtin();
for (config.Runtime.settings) |setting| {
const registered = std.meta.stringToEnum(Builtin, setting.word) != null;
try std.testing.expectEqual(setting.enabled(capabilities), registered);
}
- const effect_code_registered = std.meta.stringToEnum(Builtin, "EffectCode") != null;
- try std.testing.expectEqual(EffectCode.enabled, effect_code_registered);
}
test "a builtin's scope is the pane unless it says session, and every setting is the session's" {
@@ -1635,20 +1632,6 @@ pub const Changelog = struct {
}
};
-/// Open the source of a panel transition or post shader, by name.
-pub const EffectCode = struct {
- pub const scope: Scope = .session;
- pub const takes_arg = true;
- pub const requires_arg = true;
- pub const enabled = capabilities.panel_transitions or capabilities.scene_shaders;
- pub const gui_only = true;
- pub const output: OutputTraits = .{ .name = config.effect_code_buffer };
- pub fn run(c: Ctx) void {
- panes.Output.openEffectCode(c.p, c.id, c.arg orelse return) catch |err|
- c.p.reportError(c.id, "effect code", err);
- }
-};
-
/// An optional SDL workspace-tag companion; never consumes input or text cells.
pub const Pet = struct {
pub const scope: Scope = .session;