This allows for slightly more fancy configuration in the future, but for now it is rather simple: your lua script returns a configuration struct with the same shape as that from the TOML file. A `wezterm` module is provided to the script that provides some constants to help understand the environment in which wezterm is running. I want to add some helpers that make setting up the fonts feel less weird (lots of nesting in the data model makes this weird). The ability to conditionally construct configuration is powerful and helps to address the broader request in refs: https://github.com/wez/wezterm/issues/152 An example config looks like this: ```lua local wezterm = require 'wezterm'; print(wezterm.config_dir); print(wezterm.executable_dir); wezterm.log_error("w00t! running " .. wezterm.version .. " on " .. wezterm.target_triple .. " " .. wezterm.home_dir); return { enable_scroll_bar = true, enable_tab_bar = true, ratelimit_output_bytes_per_second = 400000, scrollback_lines = 350000, font_dirs = {".dotfiles/fonts"}, window_padding = { left = 2, bottom = 2, }, font = { font = {{ family = "Operator Mono SSm Lig Medium", }}, }, unix_domains = { { name = "unix", } }, ssh_domains = { { name = "localhost", remote_address = "localhost", username = "wez", }, }, tls_clients = { { name = "cubetls", remote_address = "cube-localdomain:8080", bootstrap_via_ssh = "cube-localdomain", }, }, tls_servers = { { bind_address = "192.168.1.8:8080", }, }, hyperlink_rules = { { regex = "\\b\\w+://(?:[\\w.-]+)\\.[a-z]{2,15}\\S*\\b", format = "$0", }, }, font_rules= { { italic = true, font = { font = {{ family = "Operator Mono SSm Lig Medium Italic", }} }, }, { italic = true, intensity = "Bold", font = { font = {{ family = "Operator Mono SSm Lig Book Italic", }} }, }, { intensity = "Bold", font = { foreground = "tomato", font = {{ family = "Operator Mono SSm Lig Bold", }} }, }, { intensity = "Half", font = { font = {{ family = "Operator Mono SSm Lig Light", }} }, }, }, } ```
116 lines
2.6 KiB
TOML
116 lines
2.6 KiB
TOML
[package]
|
|
authors = ["Wez Furlong <wez@wezfurlong.org>"]
|
|
name = "wezterm"
|
|
version = "0.1.0"
|
|
edition = "2018"
|
|
build = "build.rs"
|
|
|
|
[build-dependencies]
|
|
vergen = "3"
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
embed-resource = "1.3"
|
|
|
|
[dependencies]
|
|
allsorts = "0.1"
|
|
async-task = "1.2"
|
|
async-trait = "0.1"
|
|
anyhow = "1.0"
|
|
thiserror = "1.0"
|
|
base64 = "0.10"
|
|
base91 = { path = "base91" }
|
|
rangeset = { path = "rangeset" }
|
|
bitflags = "1.0"
|
|
crossbeam = "0.7"
|
|
dirs = "1.0"
|
|
downcast-rs = "1.0"
|
|
euclid = "0.20"
|
|
filedescriptor = { version="0.7", path = "filedescriptor" }
|
|
pretty_env_logger = "0.4"
|
|
failure = "0.1"
|
|
failure_derive = "0.1"
|
|
freetype = { path = "deps/freetype" }
|
|
image = "0.21"
|
|
harfbuzz = { path = "deps/harfbuzz" }
|
|
hostname = "0.3"
|
|
lazy_static = "1.3"
|
|
leb128 = "0.2"
|
|
libc = "0.2"
|
|
log = "0.4"
|
|
lru = "0.4"
|
|
open = "1.2"
|
|
metrics = { version="0.12", features=["std"]}
|
|
mlua = {version="0.2", features=["vendored"]}
|
|
hdrhistogram = "6.3"
|
|
openssl = "0.10"
|
|
# file change notification
|
|
notify = "4.0"
|
|
palette = "0.5"
|
|
portable-pty = { path = "pty", features = ["serde_support", "ssh"]}
|
|
promise = { path = "promise" }
|
|
ratelimit_meter = "5.0"
|
|
rcgen = "0.7"
|
|
serde = {version="1.0", features = ["rc", "derive"]}
|
|
serial = "0.4"
|
|
ssh2 = "0.8"
|
|
structopt = "0.3"
|
|
tabout = { path = "tabout" }
|
|
term = { path = "term" }
|
|
termwiz = { path = "termwiz" }
|
|
textwrap = "0.11"
|
|
toml = "0.4"
|
|
unicode-normalization = "0.1"
|
|
unicode-segmentation = "1.5"
|
|
unicode-width = "0.1"
|
|
url = "2"
|
|
varbincode = "0.1"
|
|
walkdir = "2"
|
|
window = { path = "window", features=["opengl", "wayland"]}
|
|
zstd = "0.4"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
daemonize = { git = "https://github.com/wez/daemonize" }
|
|
|
|
[target.'cfg(not(windows))'.dependencies]
|
|
# show a notification
|
|
notify-rust = "3"
|
|
|
|
# on linux, font-loader pulls in servo-font* crates which conflict with
|
|
# our newer font related deps, so we avoid it on linux
|
|
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
|
|
font-loader = { version = "0.8" }
|
|
font-kit = "0.5"
|
|
|
|
[target."cfg(windows)".dependencies]
|
|
dwrote = "0.9"
|
|
shared_library = "0.1"
|
|
uds_windows = "0.1"
|
|
winapi = { version = "0.3", features = [
|
|
"winuser",
|
|
"consoleapi",
|
|
"handleapi",
|
|
"fileapi",
|
|
"namedpipeapi",
|
|
"synchapi",
|
|
"winsock2",
|
|
]}
|
|
winrt-notification = "0.2"
|
|
|
|
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
|
|
fontconfig = { path = "deps/fontconfig" }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
core-foundation = "0.7"
|
|
core-graphics = "0.19"
|
|
core-text = "15.0"
|
|
|
|
[features]
|
|
default = ["vendor_openssl"]
|
|
# FIXME: find a way to magically disable vendor_openssl only on linux!
|
|
vendor_openssl = ["openssl/vendored"]
|
|
|
|
[workspace]
|
|
|
|
[profile.release]
|
|
opt-level = 3
|