local wezterm = require 'wezterm' local act = wezterm.action -- Same as Konsole, with yellow cursor local scheme = wezterm.get_builtin_color_schemes()['Breeze'] scheme.cursor_bg = "ffb800" scheme.cursor_fg = "black" scheme.visual_bell = "#661111" scheme.split = "#888888" local function file_exists(name) local f=io.open(name,"r") if f ~= nil then io.close(f) return true else return false end end local home = os.getenv("HOME") local zsh_bin = home .. "/bin/zsh" if not file_exists(zsh_bin) then zsh_bin = "/usr/bin/zsh" end return { automatically_reload_config = true, font = wezterm.font_with_fallback({ "Hack Nerd Font Mono", "NotoMono Nerd Font", "Noto Sans Mono", "Noto Color Emoji", "Noto Sans Mono CJK JP" }), font_size = 13.0, harfbuzz_features = {"calt=0", "clig=0", "liga=0"}, warn_about_missing_glyphs = false, term = file_exists(home .. "/.terminfo/w/wezterm") and "wezterm" or "xterm-256colors", scrollback_lines = 10000, enable_scroll_bar = true, hide_tab_bar_if_only_one_tab = true, -- window_decorations = "RESIZE", -- dpi = 96.0, -- use_ime = false, -- enable_wayland = true, -- front_end = "Software", -- bernie: experimental for benchmarking mux_output_parser_coalesce_delay_ms = 0, audible_bell = "Disabled", visual_bell = { fade_in_duration_ms = 0, fade_out_duration_ms = 50, target = "BackgroundColor", -- target = "CursorColor", }, color_schemes = { ["Bernie"] = scheme, }, color_scheme = "Bernie", window_background_opacity = 1.0, window_background_gradient = { orientation = "Vertical", colors = { "#111844", "#111133", "#110808" }, -- preset = "Warm", interpolation = "Linear", blend = "Rgb", noise = 32, segment_size = 200, segment_smoothness = 0.0, }, inactive_pane_hsb = { saturation = 0.9, brightness = 0.9, }, window_padding = { left = 2, right = 0, top = 0, bottom = 0, }, default_prog = {zsh_bin}, launch_menu = { { args = {"top"}, }, { label = "Bash", args = {"bash", "-l"}, }, }, keys = { -- {key="r", mods="CMD|SHIFT", action="ReloadConfiguration"}, {mods="CTRL|SHIFT", key="d", action=act{SplitVertical={domain="CurrentPaneDomain"}}}, {mods="CTRL|SHIFT", key="r", action=act{SplitHorizontal={domain="CurrentPaneDomain"}}}, {mods="CTRL|SHIFT", key="w", action=act{CloseCurrentPane={confirm=true}}}, {mods="CTRL|SHIFT", key="n", action=act.RotatePanes 'Clockwise'}, {mods="CTRL|SHIFT", key="F11", action="ToggleFullScreen"}, }, -- Middle mouse button pastes the primary selection. mouse_bindings = { { event = { Down = { streak = 1, button = "Middle" } }, mods = "NONE", action = act.PasteFrom "PrimarySelection", }, }, unix_domains = { { name = "unix", }, }, -- default_gui_startup_args = {"connect", "unix"}, ssh_domains = { { name = "desk", remote_address = "binnocenti-z2.spacex.corp", remote_wezterm_path = "/home/binnocenti/bin/wezterm", username = "binnocenti", }, { name = "sunjammer", remote_address = "sunjammer.sugarlabs.org", username = "root", } }, tls_clients = { { name = "desktls", remote_address = "binnocenti-z2.spacex.corp:8080", bootstrap_via_ssh = "binnocenti@binnocenti-z2.spacex.corp", }, { name = "sunjammertls", remote_address = "sunjammer.sugarlabs.org", bootstrap_via_ssh = "bernie@sunjammer.sugarlabs.org", }, }, }