mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 22:33:52 +03:00
ab03147bd9
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", }} }, }, }, } ``` |
||
---|---|---|
.. | ||
config | ||
font | ||
frontend | ||
mux | ||
scripting | ||
server | ||
connui.rs | ||
keyassignment.rs | ||
localtab.rs | ||
main.rs | ||
ratelim.rs | ||
ssh.rs | ||
stats.rs | ||
termwiztermtab.rs |