nix-config/modules/home/shell/wezterm.nix

116 lines
2.9 KiB
Nix
Raw Permalink Normal View History

2024-05-07 03:23:55 -04:00
{...}: {
programs.wezterm = {
enable = true;
extraConfig = ''
local wezterm = require('wezterm')
local c = wezterm.config_builder()
local resize_amount = 3;
local wezmodeConfig = {
theme = {
textColor = "white",
hintColor = "#a6e3a1",
normalModeColor = "#cba6f7",
modeTextColor = "#11111b",
}
}
wezterm.plugin.require('https://github.com/nekowinston/wezterm-bar').apply_to_config(c, {
position = 'bottom',
max_width = 32,
dividers = 'slant_right',
indicator = {
leader = {
enabled = true,
off = ' ',
on = ' ',
},
mode = {
enabled = true,
names = {
resize_mode = 'RESIZE',
copy_mode = 'VISUAL',
search_mode = 'SEARCH',
},
},
},
tabs = {
numerals = 'arabic',
pane_count = 'subscript',
brackets = {
active = { "", ':' },
inactive = { "", ':' },
},
},
clock = {
enabled = true,
format = '%l:%M %p',
},
})
local act = wezterm.action
local keybinds = {
{
key = 'Enter',
mods = 'CTRL|SHIFT',
action = act.SplitHorizontal({ domain = 'CurrentPaneDomain' }),
},
{
key = 'h',
2024-05-16 02:40:39 -04:00
mods = 'ALT|SHIFT',
2024-05-07 03:23:55 -04:00
action = act.ActivatePaneDirection('Left'),
},
{
key = 'l',
2024-05-16 02:40:39 -04:00
mods = 'ALT|SHIFT',
2024-05-07 03:23:55 -04:00
action = act.ActivatePaneDirection 'Right',
},
{
key = 'k',
2024-05-16 02:40:39 -04:00
mods = 'ALT|SHIFT',
2024-05-07 03:23:55 -04:00
action = act.ActivatePaneDirection 'Up',
},
{
key = 'j',
2024-05-16 02:40:39 -04:00
mods = 'ALT|SHIFT',
2024-05-07 03:23:55 -04:00
action = act.ActivatePaneDirection 'Down',
},
2024-05-16 02:40:39 -04:00
{
key = 't',
mods = 'CTRL|SHIFT',
action = act.SpawnCommandInNewTab { cwd = wezterm.home_dir },
}
2024-05-07 03:23:55 -04:00
}
local config = {
2024-05-16 02:40:39 -04:00
initial_cols = 160,
2024-05-07 03:23:55 -04:00
adjust_window_size_when_changing_font_size = false,
color_scheme = 'Catppuccin Mocha',
cursor_blink_ease_in = 'Constant',
cursor_blink_ease_out = 'Constant',
cursor_blink_rate = 500,
default_cursor_style = 'BlinkingBar',
2024-05-16 02:40:39 -04:00
enable_kitty_graphics = true,
2024-05-07 03:23:55 -04:00
enable_scroll_bar = false,
2024-05-28 04:08:06 -04:00
enable_wayland = false,
2024-06-13 02:30:20 -04:00
font_size = 18,
2024-05-07 03:23:55 -04:00
font = wezterm.font('Maple Mono NF'),
2024-05-16 02:40:39 -04:00
keys = keybinds,
2024-05-28 04:08:06 -04:00
front_end = 'OpenGL',
2024-05-07 03:23:55 -04:00
underline_position = -4,
use_fancy_tab_bar = false,
window_background_opacity = 0.8,
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
}
for k, v in pairs(config) do
c[k] = v
end
return c
'';
};
}