summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 22:27:38 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitd4960472375ea68f709c56a677d8a37571419ff7 (patch)
tree8b5b2dde93eded887c7b1a17164137c3c09a4bb7 /src/config.zig
parentdfa5bd4d413504a6afff414962c4de70ab093af0 (diff)
downloadpardes-d4960472375ea68f709c56a677d8a37571419ff7.tar.gz
pardes-d4960472375ea68f709c56a677d8a37571419ff7.zip
Config opens the startup file, DumpConfig the settings report, and the workspace tag reads Dump Themes Config Debug Exit
Config (SPC f c) opens init, found as the settings report finds it (opts.startup_config_path: $XDG_CONFIG_HOME/pardes/init or ~/.config/pardes/init, and the macOS and Windows paths config.md gives). A pane that already holds it is gone to instead; a file on disk is looked at; with none, an empty pane is named for it, and Save makes its directory and any above it first (File.make_dirs, fs.makeDirs) before writing. Without a configuration directory it says so and opens nothing. The report Config used to open, the startup path and every live setting, is DumpConfig, in a +DumpConfig pane. No alias keeps the old meaning. The workspace tag's default words put Themes where NextColor was, NextColor staying a builtin, and Config beside it. A tag the user edited is kept as it was: a dump stores only an edited one (topbar_custom), and a restore puts back only that. theme.snap types NextColor onto the workspace tag to click it, and tagnav's walk back to Dump takes five long-word steps. The rest of the re-recorded goldens differ in the workspace words and their widths only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/config.zig b/src/config.zig
index ea7a877a..bb033823 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -68,6 +68,7 @@ pub const leader_path = paths: {
.Recent = "fr",
.Grep = "fg",
.Config = "fc",
+ .DumpConfig = null,
.LocationsConfig = null,
.Tutor = "ht",
.Changelog = "hc",
@@ -266,7 +267,7 @@ pub const child_term = "xterm-256color";
pub const child_colorterm = "truecolor";
pub const child_term_program = "pardes";
-pub const topbar_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit";
+pub const topbar_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit";
pub const pane_builtins_str = "Tty Collapse Del";
pub const pdf_pane_builtins_str = "Tty PdfSections PdfTint Collapse Del";
@@ -452,7 +453,7 @@ pub const pipe_marker = " |";
pub const search_buffer = "+Search";
pub const help_buffer = "+Help";
-pub const config_buffer = "+Config";
+pub const dump_config_buffer = "+DumpConfig";
pub const effect_code_buffer = "+EffectCode";
pub const jumps_buffer = "+Jumps";
pub const recent_buffer = "+Recent";
@@ -968,7 +969,7 @@ pub const Runtime = struct {
}
};
- // The builtin registry and Config report share this command table.
+ // The builtin registry and DumpConfig report share this command table.
pub const settings = [_]Setting{
.{ .word = "Colors", .action = .{ .toggle = .colors }, .doc = "Syntax colours in text panes, on or off." },
.{ .word = "Wrap", .action = .{ .toggle = .wrap }, .doc = "Long lines wrap onto the next row, on or off." },
@@ -1292,7 +1293,7 @@ pub const Runtime = struct {
/// Each line reads as the command that would set it: the word, then the
/// value you would type after it. No colons, no units — `WindowOpacity 70`
- /// is both what Config prints and what you write back.
+ /// is both what DumpConfig prints and what you write back.
pub fn writeReport(out: *std.Io.Writer, context: ReportContext) !void {
const state = context.state;
var wrote_transition = false;
@@ -1653,7 +1654,7 @@ pub const Runtime = struct {
try std.testing.expect(FontSpec.parse(bad) == null);
}
- test "Config report observes every simple setting and all live context" {
+ test "DumpConfig report observes every simple setting and all live context" {
var state: Runtime = .{};
// Every setting, every context line: the report outgrows 4K.
var storage: [8192]u8 = undefined;