diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 12:35:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 15:18:26 -0300 |
| commit | e65ada6bfab3e3851281be253b5e8187b652b66b (patch) | |
| tree | 8eda0b933dd1c1c0e1310963b1be0000d01281e7 /src/config.zig | |
| parent | ba3c654472ee0dd9fb5d39dd24063c07a44c6752 (diff) | |
| download | pardes-e65ada6bfab3e3851281be253b5e8187b652b66b.tar.gz pardes-e65ada6bfab3e3851281be253b5e8187b652b66b.zip | |
the Pet back, the window's alone: src/gui/pet.zig and the window's pet overlay return as they were (the workspace tag's blank end, the tag's colours, now read from the Surface's chrome, its walk and hop on the window's own clock, SDL_GetTicks), and Pet is a plain setting now, a choice of off, cat or frog the window reads (config.Runtime.pet, a byte with no state behind it, dumped and replicated as any setting, in /ctl and DumpConfig as `Pet <name>`, and as `# Pet unsupported` where no window draws it, so an init file shared with a terminal loads there clean); its behaviour test and the appearance gallery's pets return
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.zig b/src/config.zig index 3024fc5a..a7520b38 100644 --- a/src/config.zig +++ b/src/config.zig @@ -170,6 +170,7 @@ pub const leader_path = paths: { table.set(.ProgramEsc, null); table.set(.Motion, null); if (builtins.capabilities.lift) table.set(.GripWidth, null); + if (builtins.capabilities.lift) table.set(.Pet, null); if (builtins.TreeContext.enabled) table.set(.TreeContext, null); table.set(.ThemeFile, null); table.set(.DumpThemes, null); @@ -740,6 +741,9 @@ pub const Runtime = struct { window_opacity: u8 = 100, window_blur: u8 = 0, window_opacity_pending: bool = true, + /// The window's companion in the workspace tag's blank space + /// (gui/pet.zig), or none: a setting alone, the window moves it. + pet: Pet = .off, // Effective values change only after a host acknowledges the request. shell: struct { @@ -794,7 +798,8 @@ pub const Runtime = struct { pub const SearchPlace = enum { attached, column }; pub const SearchPane = enum { reuse, new }; /// A setting that is one of a few words, each an enum field of Runtime. - pub const Choice = enum { pager, term_images, jump_scope, search_place, search_pane }; + pub const Choice = enum { pager, term_images, jump_scope, search_place, search_pane, pet }; + pub const Pet = enum { off, cat, frog }; pub const tagline_percent_min: u8 = 1; pub const tagline_percent_max: u8 = 100; @@ -916,6 +921,7 @@ pub const Runtime = struct { .cursor_blink => .lift, else => null, }, + .choice => |which| if (which == .pet) .lift else null, else => null, }; } @@ -936,6 +942,7 @@ pub const Runtime = struct { .{ .word = "ProgramEsc", .action = .{ .toggle = .program_esc }, .doc = "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them." }, .{ .word = "Motion", .action = .motion, .doc = "How animations move: off, crisp, smooth, bouncy or playful." }, .{ .word = "GripWidth", .action = .grip_width, .doc = "The grip and scrollbar width, as a percent of the theme's rail." }, + .{ .word = "Pet", .action = .{ .choice = .pet }, .doc = "The window's companion in the workspace tag's blank space: off, cat or frog." }, .{ .word = "MessageLinger", .action = .{ .message_ms = .linger }, .doc = "How long, in milliseconds, a message stays after what dismisses it." }, .{ .word = "MessageFall", .action = .{ .message_ms = .fall }, .doc = "How long, in milliseconds, a message takes to fall into its row." }, .{ .word = "MessageDissolve", .action = .{ .message_ms = .dissolve }, .doc = "How long, in milliseconds, a message takes to dissolve." }, |
