Files
dotfiles/wezterm/.config/wezterm/wezterm.lua
2026-04-10 09:01:34 +02:00

44 lines
1.3 KiB
Lua

local wezterm = require 'wezterm'
local config = {}
local theme = require('theme/init').main
-- Font configuration
config.font = wezterm.font 'JetBrainsMono Nerd Font'
config.font_size = 11.0
config.colors = theme.colors()
-- Window
config.enable_tab_bar = true
config.window_close_confirmation = 'NeverPrompt'
-- Only show tab bar when there are multiple tabs
wezterm.on('update-right-status', function(window, pane)
local overrides = window:get_config_overrides() or {}
local tabs = window:mux_window():tabs()
local show = #tabs > 1
if overrides.enable_tab_bar ~= show then
overrides.enable_tab_bar = show
window:set_config_overrides(overrides)
end
end)
-- Wayland specific fixes
config.enable_wayland = true
-- Enable Kitty keyboard protocol for better key disambiguation (Ctrl+I vs Tab)
config.enable_kitty_keyboard = true
-- Keybindings
config.keys = {
{ key = 'LeftArrow', mods = 'CTRL|SHIFT', action = wezterm.action.ActivateTabRelative(-1) },
{ key = 'RightArrow', mods = 'CTRL|SHIFT', action = wezterm.action.ActivateTabRelative(1) },
}
-- Machine-local overrides (not tracked in dotfiles)
-- Create ~/.config/wezterm/local.lua returning a function that mutates config
local ok, local_config = pcall(require, 'local')
if ok then local_config(config) end
return config