This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/wezterm/wezterm.lua

126 lines
2.4 KiB
Lua
Raw Normal View History

2023-05-09 12:05:12 -05:00
local wezterm = require 'wezterm'
local catpuccin = require 'catpuccin'
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
2023-05-24 15:35:28 -05:00
local hostname = io.popen("/bin/hostname"):read("*a"):gsub("%s", "")
2023-07-28 00:56:43 -05:00
local font_spec = { family = 'IosevkaLyteTerm', weight = 'Medium', italic = false }
2023-05-24 15:35:28 -05:00
local font_size = 12.0
2023-05-09 13:35:49 -05:00
2023-05-24 15:35:28 -05:00
if hostname == "laptop" then
font_size = 13
end
2023-05-09 12:05:12 -05:00
2023-05-24 15:35:28 -05:00
local font = wezterm.font_with_fallback{
font_spec,
2023-05-09 20:19:26 -05:00
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
'Noto Color Emoji',
}
2023-05-24 15:35:28 -05:00
if hostname == "laptop" then
config.font_rules = {
-- no italics
{
font = font
},
}
end
config.default_cursor_style = 'BlinkingBar'
catpuccin.apply_to_config(config)
config.font = font
config.font_size = font_size
2023-05-09 12:05:12 -05:00
config.hide_tab_bar_if_only_one_tab = true
2023-05-09 13:52:59 -05:00
config.use_fancy_tab_bar = false
2023-07-28 00:56:43 -05:00
config.tab_bar_at_bottom = false
2023-05-09 12:05:12 -05:00
config.window_background_opacity = 1.0
2023-05-09 13:35:49 -05:00
config.color_scheme = "Catppuccin Mocha"
2023-05-09 20:19:26 -05:00
config.window_frame.font = config.font
2023-05-24 15:35:28 -05:00
config.window_frame.font_size = font_size
2023-05-09 13:35:49 -05:00
config.inactive_pane_hsb = {
saturation = 0.8,
brightness = 0.7,
}
2023-05-09 12:05:12 -05:00
config.keys = {
2023-07-28 00:56:43 -05:00
{
key = 'j',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Down'
},
2023-05-24 15:27:31 -05:00
{
key = 'Insert',
mods = 'SHIFT',
action = wezterm.action.PasteFrom'Clipboard'
},
{
key = 'v',
mods = 'CTRL|SHIFT',
action = wezterm.action.PasteFrom'PrimarySelection'
},
2023-05-09 12:05:12 -05:00
{
key = 'h',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Left'
},
{
key = 'l',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Right'
},
{
key = 'k',
mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Up'
},
2023-07-28 00:56:43 -05:00
{
key = 'j',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'}
},
{
key = 'l',
mods = 'CTRL|SHIFT',
action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'}
},
2023-05-09 13:35:49 -05:00
{
key = 'l',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.ShowDebugOverlay
},
2023-06-06 00:57:28 -05:00
{
key = 'r',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.RotatePanes'Clockwise'
},
2023-05-09 12:05:12 -05:00
}
2023-07-28 00:56:43 -05:00
config.unix_domains = {
{
name = 'unix',
local_echo_threshold_ms = 10,
},
}
config.default_gui_startup_args = { 'connect', 'unix' }
config.default_domain = 'unix'
2023-05-09 20:19:26 -05:00
config.window_padding = {
top = '0.5cell',
bottom = '0.5cell',
left = '1cell',
right = '1cell',
}
2023-05-09 12:05:12 -05:00
return config