feat(terminal): export COLORTERM and COLORFGBG evn vars
This commit is contained in:
parent
cde7e4c6f5
commit
a6b3da2d16
1 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,12 @@ pub fn run_cmd(self: *Self, ctx: command.Context) !void {
|
||||||
errdefer env.deinit();
|
errdefer env.deinit();
|
||||||
if (env.get("TERM") == null)
|
if (env.get("TERM") == null)
|
||||||
try env.put("TERM", "xterm-256color");
|
try env.put("TERM", "xterm-256color");
|
||||||
|
try env.put("COLORTERM", "truecolor");
|
||||||
|
// COLORFGBG tells apps whether the terminal background is dark or light
|
||||||
|
try env.put("COLORFGBG", switch (tui.active_color_scheme()) {
|
||||||
|
.dark => "15;0",
|
||||||
|
.light => "0;15",
|
||||||
|
});
|
||||||
|
|
||||||
var cmd_arg: []const u8 = "";
|
var cmd_arg: []const u8 = "";
|
||||||
var on_exit: TerminalOnExit = tui.config().terminal_on_exit;
|
var on_exit: TerminalOnExit = tui.config().terminal_on_exit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue