summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 19:26:12 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit939c369aee270067d9f030e2b234d93bae549988 (patch)
tree6e3541479cbc228bdd1566f4805496c538ec2f3e /src/config.zig
parent109a558a0488f3269f1864985e9b3db5f58b9552 (diff)
downloadpardes-939c369aee270067d9f030e2b234d93bae549988.tar.gz
pardes-939c369aee270067d9f030e2b234d93bae549988.zip
After a ThemeFile, the root ctl and DumpConfig say ThemeFile and its path, so what they report writes back
Both said Theme and the name inside the .zon, which no Theme knows, so writing the report back to /ctl failed with "no theme". While a loaded ThemeFile is the theme in effect they now say the word that loaded it. A Dump carries the line too, so a Restore reloads the file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config.zig b/src/config.zig
index 592281d3..a7377cfa 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -1267,6 +1267,9 @@ pub const Runtime = struct {
startup_config_path: ?[]const u8,
platform: []const u8,
theme_name: []const u8,
+ /// The ThemeFile in effect, said as `ThemeFile <path>` in place
+ /// of the theme's name.
+ theme_file: ?[]const u8 = null,
compiled_default_shell: []const u8,
hover_delay_frames: ?u16,
/// Where dumps go when `DumpDir` is unset; empty without a host
@@ -1305,7 +1308,10 @@ pub const Runtime = struct {
};
try out.print("{s} {s}\n", .{ setting.word, onOff(value) });
},
- .theme => try out.print("{s} {s}\n", .{ setting.word, context.theme_name }),
+ .theme => if (context.theme_file) |path|
+ try out.print("ThemeFile {s}\n", .{path})
+ else
+ try out.print("{s} {s}\n", .{ setting.word, context.theme_name }),
.window_opacity => {
if (setting.enabled(context.capabilities))
try out.print("{s} {d}\n", .{ setting.word, state.window_opacity })