2023-04-01 21:29:47 +02:00
|
|
|
-- {{{ Import stuff & create config object
|
|
|
|
local wezterm = require("wezterm")
|
|
|
|
local colorscheme = require("colorscheme") -- injected by nix!
|
|
|
|
|
|
|
|
-- This table will hold the configuration.
|
|
|
|
local config = {}
|
|
|
|
|
|
|
|
-- In newer versions of wezterm, use the config_builder which will
|
|
|
|
-- help provide clearer error messages
|
|
|
|
if wezterm.config_builder then
|
|
|
|
config = wezterm.config_builder()
|
|
|
|
end
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
local font_size = 20.0
|
|
|
|
|
|
|
|
-- {{{ Theming
|
|
|
|
config.colors = wezterm.color.load_base16_scheme(colorscheme.source)
|
|
|
|
|
|
|
|
-- {{{ Window frame
|
|
|
|
config.window_frame = {
|
|
|
|
font = wezterm.font({ family = colorscheme.fonts.monospace }),
|
|
|
|
font_size = font_size,
|
|
|
|
active_titlebar_bg = colorscheme.base00,
|
|
|
|
inactive_titlebar_bg = colorscheme.base00,
|
|
|
|
}
|
|
|
|
-- }}}
|
|
|
|
-- {{{ Tab bar colors
|
|
|
|
config.colors.tab_bar = {
|
|
|
|
background = colorscheme.base02,
|
|
|
|
active_tab = {
|
|
|
|
bg_color = colorscheme.base0A,
|
|
|
|
fg_color = colorscheme.base00,
|
|
|
|
},
|
|
|
|
inactive_tab = {
|
|
|
|
bg_color = colorscheme.base02,
|
|
|
|
fg_color = colorscheme.base05,
|
|
|
|
},
|
|
|
|
inactive_tab_hover = {
|
|
|
|
bg_color = colorscheme.base01,
|
|
|
|
fg_color = colorscheme.base05,
|
|
|
|
},
|
|
|
|
new_tab = {
|
|
|
|
bg_color = colorscheme.base02,
|
|
|
|
fg_color = colorscheme.base05,
|
|
|
|
},
|
|
|
|
new_tab_hover = {
|
|
|
|
bg_color = colorscheme.base02,
|
|
|
|
fg_color = colorscheme.base05,
|
|
|
|
italic = true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
-- }}}
|
2023-11-10 17:28:14 +01:00
|
|
|
-- {{{ Other visual things
|
|
|
|
config.window_background_opacity = 0.6 -- TODO: load from nix!
|
2023-08-13 04:15:32 +02:00
|
|
|
-- }}}
|
2023-04-01 21:29:47 +02:00
|
|
|
-- }}}
|
|
|
|
-- {{{ Main config options
|
|
|
|
config.automatically_reload_config = true
|
2023-11-10 17:28:14 +01:00
|
|
|
|
|
|
|
-- {{{ Fonts
|
|
|
|
config.adjust_window_size_when_changing_font_size = false -- Makes it work with fixed window sizes.
|
2023-04-01 21:29:47 +02:00
|
|
|
config.font_size = font_size
|
2023-11-10 17:28:14 +01:00
|
|
|
-- }}}
|
|
|
|
-- {{{ Tab bar
|
|
|
|
config.use_fancy_tab_bar = true
|
|
|
|
-- config.enable_tab_bar = false
|
|
|
|
config.hide_tab_bar_if_only_one_tab = true
|
|
|
|
-- }}}
|
|
|
|
-- {{{ Keycodes
|
2023-05-18 01:56:19 +02:00
|
|
|
config.disable_default_key_bindings = true
|
|
|
|
-- config.enable_kitty_keyboard = true -- Let's apps recognise more distinct keys
|
|
|
|
config.enable_csi_u_key_encoding = true -- For some reason I need this for all keybinds to work inside neovim.
|
|
|
|
-- }}}
|
2023-11-10 17:28:14 +01:00
|
|
|
-- }}}
|
2023-05-18 01:56:19 +02:00
|
|
|
-- {{{ Keybinds
|
2023-04-01 21:29:47 +02:00
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- and finally, return the configuration to wezterm
|
|
|
|
return config
|