mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-11 11:49:40 +00:00
Add a shared encoder for CSI ? 997 ; Ps n color scheme reports and use it for both CSI ? 996 n replies and unsolicited Termio reports. Export the same encoder through the libghostty-vt C API with docs and an example. This is a really light API, arguably easy for consumers to hardcode, but it didn't match the rest of our style in the libghostty API so we should expose it. Example: GHOSTTY_COLOR_SCHEME_DARK encodes to ESC [ ? 997 ; 1 n, while GHOSTTY_COLOR_SCHEME_LIGHT encodes to ESC [ ? 997 ; 2 n.
25 lines
855 B
Zig
25 lines
855 B
Zig
.{
|
|
.name = .c_vt_color_scheme,
|
|
.version = "0.0.0",
|
|
.fingerprint = 0xb794dffb11875b23,
|
|
.minimum_zig_version = "0.15.1",
|
|
.dependencies = .{
|
|
// Ghostty dependency. In reality, you'd probably use a URL-based
|
|
// dependency like the one showed (and commented out) below this one.
|
|
// We use a path dependency here for simplicity and to ensure our
|
|
// examples always test against the source they're bundled with.
|
|
.ghostty = .{ .path = "../../" },
|
|
|
|
// Example of what a URL-based dependency looks like:
|
|
// .ghostty = .{
|
|
// .url = "https://github.com/ghostty-org/ghostty/archive/COMMIT.tar.gz",
|
|
// .hash = "N-V-__8AAMVLTABmYkLqhZPLXnMl-KyN38R8UVYqGrxqO36s",
|
|
// },
|
|
},
|
|
.paths = .{
|
|
"build.zig",
|
|
"build.zig.zon",
|
|
"src",
|
|
},
|
|
}
|