mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
aaf3a7fcaf
This commit changes the behavior on Windows: * If $TERM is set and the `terminfo` crate is able to successfully initialize and locate a terminfo database (this also requires that $TERMINFO be set in the environment), then we'll use the `TerminfoRenderer` instead of the `WindowsConsoleRenderer` * If $TERM is set to `xterm-256color` and no terminfo database was found, use our modern compiled-in copy (look in the `termwiz/data/` directory for the source and compiled version of this) and use the `TerminfoRenderer`. * Otherwise use the `WindowsConsoleRenderer`. In practice, this allows termwiz apps to opt in to features such as true color support on Windows 10 build 1903 an later by setting their `TERM=xterm-256color`. This happens to be the default behavior when `ssh`ing in to a windows host via `wezterm`. You can see the truecolor mode get applied by running this example: ``` cargo run --example widgets_basic --features widgets ``` with TERM set as above the background region that is painted by the app will be a blueish/purplish color, but with it unset or set to something invalid, it will fall back to black. I'd like to eventually make termwiz assume the equivalent configuration to `TERM=xterm-256color` by default on Windows 10 build 1903 and later, but it's worth getting some feedback on how this works for clients such as `streampager`. cc: @quark-zju and @markbt
60 lines
1.3 KiB
TOML
60 lines
1.3 KiB
TOML
[package]
|
|
authors = ["Wez Furlong"]
|
|
name = "termwiz"
|
|
version = "0.8.0"
|
|
edition = "2018"
|
|
repository = "https://github.com/wez/wezterm"
|
|
description = "Terminal Wizardry for Unix and Windows"
|
|
license = "MIT"
|
|
documentation = "https://docs.rs/termwiz"
|
|
keywords = ["terminal", "readline", "console", "curses"]
|
|
readme = "README.md"
|
|
|
|
[dependencies]
|
|
base64 = "0.10"
|
|
bitflags = "1.0"
|
|
cassowary = {version="0.3", optional=true}
|
|
anyhow = "1.0"
|
|
filedescriptor = { version="0.7", path = "../filedescriptor" }
|
|
fnv = {version="1.0", optional=true}
|
|
lazy_static = "1.3"
|
|
libc = "0.2"
|
|
log = "0.4"
|
|
memmem = "0.1"
|
|
num = "0.2"
|
|
num-traits = "0.2"
|
|
ordered-float = "1.0"
|
|
regex = "1"
|
|
semver = "0.9"
|
|
serde = {version="1.0", features = ["rc", "derive"]}
|
|
smallvec = "0.6"
|
|
terminfo = "0.7"
|
|
unicode-segmentation = "1.5"
|
|
unicode-width = "0.1"
|
|
xi-unicode = "0.2"
|
|
vtparse = { version="0.2", path="../vtparse" }
|
|
|
|
[features]
|
|
widgets = ["cassowary", "fnv"]
|
|
|
|
[dev-dependencies]
|
|
varbincode = "0.1"
|
|
|
|
[dependencies.num-derive]
|
|
features = ["full-syntax"]
|
|
version = "0.2"
|
|
[target."cfg(unix)".dependencies]
|
|
signal-hook = "0.1"
|
|
termios = "0.3"
|
|
[target."cfg(windows)".dependencies.winapi]
|
|
features = [
|
|
"winbase",
|
|
"winerror",
|
|
"winuser",
|
|
"consoleapi",
|
|
"handleapi",
|
|
"fileapi",
|
|
"synchapi",
|
|
]
|
|
version = "0.3"
|