wezterm/wezterm.lua
2025-07-01 14:22:09 +00:00

84 lines
2.6 KiB
Lua

local wezterm = require("wezterm")
local mux = wezterm.mux
wezterm.on("gui-startup", function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
window:gui_window():maximize()
end)
local config = {
default_prog = default_prog,
font = wezterm.font_with_fallback({
"Fira Code",
"Roboto",
}),
font_size = 16,
default_cursor_style = 'BlinkingUnderline',
-- color_scheme = "Ayu Dark (Gogh)",
color_scheme = "rose-pine",
background = {
{ source = { Color = "#000000" }, opacity = 1.0, height = "100%", width = "100%" },
{
source = {
File = wezterm.home_dir .. "/Pictures/ferris.png",
},
repeat_x = "NoRepeat",
repeat_y = "NoRepeat",
height = "400",
width = "400",
opacity = 0.3,
horizontal_align = "Right",
vertical_align = "Bottom",
},
},
enable_tab_bar = true,
hide_tab_bar_if_only_one_tab = true,
scrollback_lines = 10000,
disable_default_key_bindings = false,
use_dead_keys = false,
window_padding = {
left = 4,
right = 4,
top = 2,
bottom = 2,
},
adjust_window_size_when_changing_font_size = false,
keys = {
{ key = "1", mods = "ALT", action = wezterm.action.ActivateTab(0) },
{ key = "2", mods = "ALT", action = wezterm.action.ActivateTab(1) },
{ key = "3", mods = "ALT", action = wezterm.action.ActivateTab(2) },
{ key = "h", mods = "CTRL|ALT", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
{ key = "v", mods = "CTRL|ALT", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }) },
{ key = "h", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Left") },
{ key = "l", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Right") },
{ key = "k", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Up") },
{ key = "j", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Down") },
{ key = "q", mods = "ALT", action = wezterm.action.CloseCurrentPane({ confirm = true }) },
{ key = "UpArrow", mods = "ALT", action = wezterm.action.AdjustPaneSize({ "Up", 1 }) },
{ key = "DownArrow", mods = "ALT", action = wezterm.action.AdjustPaneSize({ "Down", 1 }) },
{ key = "LeftArrow", mods = "ALT", action = wezterm.action.AdjustPaneSize({ "Left", 1 }) },
{ key = "RightArrow", mods = "ALT", action = wezterm.action.AdjustPaneSize({ "Right", 1 }) },
{ key = "f", mods = "CTRL", action = wezterm.action.Search({ CaseSensitiveString = "" }) },
{ key = "Enter", mods = "SHIFT", action = wezterm.action.ActivateCopyMode },
},
}
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
config.default_prog = { "C:\\Program Files\\PowerShell\\7\\pwsh.exe" }
end
return config