dotfiles/.config/wezterm/wezterm.lua

148 lines
4 KiB
Lua
Raw Normal View History

2022-12-03 14:42:03 +01:00
local wezterm = require("wezterm")
2023-03-07 10:42:16 +01:00
local mux = wezterm.mux
local act = wezterm.action
2021-04-01 16:02:19 +02:00
local dev_host = "dln-dev"
local spawn_dev_nvim = { "ssh", dev_host, "nvim", "--listen", os.getenv("XDG_RUNTIME_DIR") .. "/nvim-persistent.sock" }
wezterm.add_to_config_reload_watch_list(os.getenv("HOME") .. "/.config/shelman-theme/current/wezterm")
2023-03-09 18:11:46 +01:00
2024-05-13 09:30:04 +02:00
local function scheme_for_appearance(appearance)
if appearance:find("Dark") then
return "Shelman Dark"
else
return "Shelman Light"
end
end
local function font_for_appearance(appearance)
if appearance:find("Dark") then
return wezterm.font({
family = "IosevkaShelman Nerd Font",
weight = "Light",
})
else
return wezterm.font({
family = "IosevkaShelman Nerd Font",
-- weight = "Regular",
--weight = "Regular",
})
end
end
2021-04-01 16:02:19 +02:00
return {
2024-05-13 09:30:04 +02:00
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
font = font_for_appearance(wezterm.gui.get_appearance()),
2024-05-16 13:08:27 +02:00
2022-12-03 14:42:03 +01:00
font_rules = {
{
2024-03-11 13:00:26 +01:00
italic = true,
intensity = "Bold",
2023-06-25 21:18:44 +02:00
reverse = false,
2024-03-11 13:00:26 +01:00
font = wezterm.font("IosevkaShelman Nerd Font", { weight = "ExtraLight", italic = true }),
-- font = wezterm.font("Iosevka Term Curly Slab", { weight = "Thin", italic = true }),
2024-05-16 13:08:27 +02:00
-- font = wezterm.font({ -- Normal text
-- -- family = "Monaspace Radon",
-- family = "Monaspace Argon",
-- harfbuzz_features = {
-- "calt",
-- "liga",
-- "dlig",
-- "ss01",
-- "ss02",
-- "ss03",
-- "ss04",
-- "ss05",
-- "ss06",
-- "ss07",
-- "ss08",
-- },
-- weight = "Regular",
-- -- weight = "ExtraLight",
-- stretch = "Normal",
-- style = "Normal",
-- }),
2023-06-25 21:18:44 +02:00
},
2024-05-16 13:08:27 +02:00
2022-12-03 14:42:03 +01:00
{
italic = true,
intensity = "Normal",
2023-06-25 21:18:44 +02:00
reverse = false,
2024-03-11 13:00:26 +01:00
font = wezterm.font("IosevkaShelman Nerd Font", { weight = "Light", italic = true }),
2022-12-03 14:42:03 +01:00
},
},
2024-05-16 13:08:27 +02:00
-- front_end = "WebGpu",
-- webgpu_power_preference = "HighPerformance",
front_end = "OpenGL",
2022-12-03 14:42:03 +01:00
warn_about_missing_glyphs = false,
bold_brightens_ansi_colors = false,
2024-03-11 13:00:26 +01:00
-- allow_square_glyphs_to_overflow_width = "Never",
2024-03-07 19:45:46 +01:00
font_size = 16,
2023-03-24 09:19:10 +01:00
command_palette_font_size = 13.5,
2024-03-11 13:00:26 +01:00
line_height = 1.0,
2023-03-09 18:11:07 +01:00
initial_cols = 132,
initial_rows = 45,
2023-03-07 10:42:16 +01:00
use_resize_increments = true,
2023-06-02 10:05:03 +02:00
adjust_window_size_when_changing_font_size = false,
2023-07-01 15:44:07 +02:00
window_decorations = "RESIZE",
2023-05-08 00:15:03 +02:00
window_padding = {
2024-03-11 13:00:26 +01:00
left = 6,
right = 6,
2023-05-08 00:15:03 +02:00
top = 0,
bottom = 0,
},
2024-03-07 19:45:46 +01:00
unicode_version = 14,
2022-12-03 14:42:03 +01:00
default_cursor_style = "SteadyBlock",
2023-07-01 10:11:24 +02:00
cursor_thickness = "6px",
2024-03-11 13:00:26 +01:00
cursor_blink_rate = 700,
2023-04-29 11:33:39 +02:00
hide_mouse_cursor_when_typing = false,
2024-03-11 13:00:26 +01:00
underline_position = -9,
underline_thickness = 1,
2022-12-03 14:42:03 +01:00
enable_wayland = true,
enable_tab_bar = false,
2022-12-03 14:42:03 +01:00
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
2022-12-03 14:42:03 +01:00
show_tab_index_in_tab_bar = true,
enable_scroll_bar = false,
scrollback_lines = 5000,
2023-03-09 18:11:07 +01:00
alternate_buffer_wheel_scroll_speed = 1,
2022-12-03 14:42:03 +01:00
check_for_updates = false,
status_update_interval = 100,
audible_bell = "Disabled",
term = "wezterm",
disable_default_key_bindings = true,
keys = {
2023-03-24 09:19:10 +01:00
{ key = "c", mods = "ALT|SHIFT", action = act.CopyTo("ClipboardAndPrimarySelection") },
2023-03-28 11:09:23 +02:00
{ key = "v", mods = "ALT|SHIFT", action = act.PasteFrom("Clipboard") },
2022-12-03 14:42:03 +01:00
{ key = "0", mods = "CTRL", action = "ResetFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "Enter", mods = "ALT", action = "ToggleFullScreen" },
2023-03-09 18:11:07 +01:00
{ key = "UpArrow", mods = "SHIFT", action = act.ScrollByLine(-1) },
{ key = "DownArrow", mods = "SHIFT", action = act.ScrollByLine(1) },
{ key = "PageUp", mods = "SHIFT", action = act.ScrollByPage(-0.5) },
{ key = "PageDown", mods = "SHIFT", action = act.ScrollByPage(0.5) },
},
mouse_bindings = {
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = "SHIFT",
action = act.ScrollByLine(-1),
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = "SHIFT",
action = act.ScrollByLine(1),
},
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
action = act.ScrollByPage(-0.25),
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
action = act.ScrollByPage(0.25),
},
2023-03-07 10:42:16 +01:00
},
2021-04-01 16:02:19 +02:00
}