Integrate with herdr cli.

This commit is contained in:
Greyson Parrelli committed 2026-11-02 10:47:08 -05:00
1 parent baa2907391
commit b5af181a4d
11 files changed
+1641 -93

No files matched your search

+16
View File
@@ -137,6 +137,16 @@ theme: Theme = .system,
/// a mistyped chord and every shell in every tab exiting.
confirm_quit: bool = true,
/// Whether new terminals run in herdr-core (`hc`) rather than in a pty of the
/// app's own.
///
/// Off by default: it needs `hc` installed, and it changes what quitting
/// means. With it on, a shell's program belongs to the core, so closing the
/// window — or the app crashing — leaves every shell and agent running, and
/// the next launch restores the session without asking, attaching to them
/// again. Closing a pane or a tab still ends what is in it. See `hc.zig`.
herdr_core: bool = false,
/// Whether a pane finishing posts a desktop notification.
///
/// On by default. The whole shape of this app is "set something going in a tab
@@ -268,6 +278,10 @@ fn parse(self: *Settings, text: []const u8) ParseError!void {
if (value == .bool) self.confirm_quit = value.bool;
}
if (root.get("herdr_core")) |value| {
if (value == .bool) self.herdr_core = value.bool;
}
if (root.get("notifications")) |value| {
if (value == .bool) self.notifications = value.bool;
}
@@ -623,6 +637,8 @@ fn serialize(self: *Settings) SaveError![]u8 {
try json.write(@tagName(self.theme));
try json.objectField("confirm_quit");
try json.write(self.confirm_quit);
try json.objectField("herdr_core");
try json.write(self.herdr_core);
try json.objectField("notifications");
try json.write(self.notifications);