Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899local wezterm = require("wezterm")
local config = {}
-- In newer versions of wezterm, use the config_builder which will-- help provide clearer error messagesif wezterm.config_builder then config = wezterm.config_builder()end
config.color_scheme = "Tango (terminal.sexy)"config.colors = { foreground = "#ffffff", background = "#000000",}config.cursor_blink_rate = 0config.font_size = 18.0config.keys = { { key = "c", mods = "ALT", action = wezterm.action({ CopyTo = "Clipboard" }) }, { key = "v", mods = "ALT", action = wezterm.action({ PasteFrom = "Clipboard" }) }, { key = "w", mods = "ALT", action = wezterm.action.CloseCurrentTab({ confirm = false }) },}if wezterm.target_triple == "x86_64-unknown-linux-gnu" then config.font = wezterm.font("DejaVuSansM Nerd Font Mono", { weight = "Regular" }) config.window_decorations = "TITLE | RESIZE"elseif wezterm.target_triple == "x86_64-apple-darwin" then config.font = wezterm.font("DejaVuSansMono Nerd Font", { weight = "Regular" }) config.window_decorations = "RESIZE" config.window_background_opacity = 0.999elseif wezterm.target_triple == "aarch64-apple-darwin" then config.font = wezterm.font("DejaVuSansMono Nerd Font", { weight = "Regular" }) config.window_decorations = "RESIZE"endconfig.window_close_confirmation = "NeverPrompt"config.window_frame = { inactive_titlebar_bg = "#000000", active_titlebar_bg = "#000000", inactive_titlebar_fg = "#000000", active_titlebar_fg = "#000000", inactive_titlebar_border_bottom = "#000000", active_titlebar_border_bottom = "#000000", button_fg = "#000000", button_bg = "#000000", button_hover_fg = "#ffffff", button_hover_bg = "#000000", border_left_width = "0.0cell", border_right_width = "0.0cell", border_bottom_height = "0.0cell", border_top_height = "0.0cell", border_left_color = "#000000", border_right_color = "#000000", border_bottom_color = "#000000", border_top_color = "#000000",}config.window_padding = { left = 0, right = 0, top = 0, bottom = 0,}config.hide_tab_bar_if_only_one_tab = trueconfig.hide_mouse_cursor_when_typing = falseconfig.mouse_bindings = { { event = { Up = { streak = 1, button = "Left" } }, mods = "NONE", action = wezterm.action.Nop, },}
-- some hack to fix cursor missing under waylandlocal function gsettings(key) return wezterm.run_child_process({ "gsettings", "get", "org.gnome.desktop.interface", key })endlocal function apply_to_config(conf) if wezterm.target_triple ~= "x86_64-unknown-linux-gnu" then -- skip if not running on linux return end local success, stdout, stderr = gsettings("cursor-theme") if success then conf.xcursor_theme = stdout:gsub("'(.+)'\n", "%1") end local success, stdout, stderr = gsettings("cursor-size") if success then conf.xcursor_size = tonumber(stdout) end config.enable_wayland = true if conf.enable_wayland and os.getenv("WAYLAND_DISPLAY") then local success, stdout, stderr = gsettings("text-scaling-factor") if success then conf.font_size = (conf.font_size or 10.0) * tonumber(stdout) end endendapply_to_config(config)
return config