a modern tui library written in zig

vaxis: implement osc2 set title

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>

+11
+1
src/ctlseqs.zig
··· 74 74 pub const strikethrough_reset = "\x1b[29m"; 75 75 76 76 // OSC sequences 77 + pub const osc2_set_title = "\x1b]2;{s}\x1b\\"; 77 78 pub const osc8 = "\x1b]8;{s};{s}\x1b\\"; 78 79 pub const osc8_clear = "\x1b]8;;\x1b\\"; 79 80 pub const osc9_notify = "\x1b]9;{s}\x1b\\";
+10
src/vaxis.zig
··· 490 490 ); 491 491 } 492 492 } 493 + 494 + /// sets the window title 495 + pub fn setTitle(self: *Self, title: []const u8) !void { 496 + if (self.tty == null) return; 497 + try std.fmt.format( 498 + self.tty.?.buffered_writer.writer(), 499 + ctlseqs.osc2_set_title, 500 + .{title}, 501 + ); 502 + } 493 503 }; 494 504 } 495 505