nixos-configuration/users/jrpotter/wezterm/wezterm.lua

121 lines
2.6 KiB
Lua
Raw Normal View History

2024-03-05 02:57:25 +00:00
local wezterm = require("wezterm")
2023-11-18 14:53:20 +00:00
return {
check_for_updates = false,
2024-03-05 02:57:25 +00:00
color_scheme = "nordfox",
font = wezterm.font "Iosevka",
2024-03-19 19:33:25 +00:00
hide_mouse_cursor_when_typing = false,
2023-11-18 14:53:20 +00:00
keys = {
{
2024-03-05 02:57:25 +00:00
key = " ",
mods = "LEADER|CTRL",
2023-11-18 14:53:20 +00:00
action = wezterm.action.ShowLauncher,
},
{
key = '"',
2024-03-05 02:57:25 +00:00
mods = "LEADER|SHIFT",
2023-11-18 14:53:20 +00:00
action = wezterm.action.SplitVertical {
2024-03-05 02:57:25 +00:00
domain = "CurrentPaneDomain",
2023-11-18 14:53:20 +00:00
},
},
{
2024-03-05 02:57:25 +00:00
key = "%",
mods = "LEADER|SHIFT",
2023-11-18 14:53:20 +00:00
action = wezterm.action.SplitHorizontal {
2024-03-05 02:57:25 +00:00
domain = "CurrentPaneDomain",
2023-11-18 14:53:20 +00:00
},
},
{
2024-03-05 02:57:25 +00:00
key = "h",
mods = "LEADER",
action = wezterm.action.ActivatePaneDirection "Left",
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "j",
mods = "LEADER",
action = wezterm.action.ActivatePaneDirection "Down",
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "k",
mods = "LEADER",
action = wezterm.action.ActivatePaneDirection "Up",
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "l",
mods = "LEADER",
action = wezterm.action.ActivatePaneDirection "Right",
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "n",
mods = "LEADER",
2023-11-18 14:53:20 +00:00
action = wezterm.action.ActivateTabRelative(1),
},
{
2024-03-05 02:57:25 +00:00
key = "p",
mods = "LEADER",
2023-11-18 14:53:20 +00:00
action = wezterm.action.ActivateTabRelative(-1),
},
{
2024-03-05 02:57:25 +00:00
key = "c",
mods = "LEADER",
action = wezterm.action.SpawnTab "CurrentPaneDomain",
},
2023-11-18 14:53:20 +00:00
{
-- Disallow hiding the terminal from the keyboard.
2024-03-05 02:57:25 +00:00
key = "m",
mods = "CMD",
2023-11-18 14:53:20 +00:00
action = wezterm.action.DisableDefaultAssignment,
},
{
2024-03-05 02:57:25 +00:00
key = "w",
mods = "LEADER",
2023-11-18 14:53:20 +00:00
action = wezterm.action.ActivateKeyTable {
2024-03-05 02:57:25 +00:00
name = "resize_mode",
2023-11-18 14:53:20 +00:00
one_shot = false,
replace_current = true,
until_unknown = true,
},
},
{
2024-03-05 02:57:25 +00:00
key = "z",
mods = "LEADER",
2023-11-18 14:53:20 +00:00
action = wezterm.action.TogglePaneZoomState,
},
},
key_tables = {
resize_mode = {
{
2024-03-05 02:57:25 +00:00
key = "q",
mods = "NONE",
2023-11-18 14:53:20 +00:00
action = wezterm.action.PopKeyTable,
},
{
2024-03-05 02:57:25 +00:00
key = "h",
mods = "NONE",
action = wezterm.action.AdjustPaneSize { "Left", 1 },
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "j",
mods = "NONE",
action = wezterm.action.AdjustPaneSize { "Down", 1 },
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "k",
mods = "NONE",
action = wezterm.action.AdjustPaneSize { "Up", 1 },
2023-11-18 14:53:20 +00:00
},
{
2024-03-05 02:57:25 +00:00
key = "l",
mods = "NONE",
action = wezterm.action.AdjustPaneSize { "Right", 1 },
2023-11-18 14:53:20 +00:00
},
},
},
leader = {
2024-03-05 02:57:25 +00:00
key = " ",
mods = "CTRL",
2023-11-18 14:53:20 +00:00
timeout_milliseconds = 1500,
},
warn_about_missing_glyphs = false,
2023-11-18 14:53:20 +00:00
}