2023-11-25 20:50:19 +00:00
|
|
|
local wezterm = require "wezterm"
|
|
|
|
|
|
2024-09-04 17:20:25 +00:00
|
|
|
local scheme = wezterm.get_builtin_color_schemes()
|
2024-12-30 09:39:39 +00:00
|
|
|
local theme = scheme["Poimandres"]
|
2024-09-04 17:20:25 +00:00
|
|
|
|
|
|
|
|
local function vim_pass_though_action(config)
|
|
|
|
|
return {
|
|
|
|
|
key = config.key,
|
|
|
|
|
mods = config.mods,
|
|
|
|
|
action = wezterm.action_callback(function(win, pane)
|
|
|
|
|
local process_name = pane:get_foreground_process_name()
|
|
|
|
|
|
|
|
|
|
-- If we are in vim then we want to send the key to go to the net pain
|
|
|
|
|
if string.match(process_name, "vim") or string.match(process_name, "emacs") then
|
|
|
|
|
win:perform_action({ SendKey = { key = config.key, mods = config.mods } }, pane)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
win:perform_action({ ActivatePaneDirection = config.direction }, pane)
|
|
|
|
|
end),
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
2023-11-25 20:50:19 +00:00
|
|
|
return {
|
|
|
|
|
-- Use a sexy terminal font with ligatures.
|
2024-06-08 13:50:57 +00:00
|
|
|
-- You will need to install the beta version of the font to get the ligatures
|
|
|
|
|
-- https://github.com/intel/intel-one-mono/issues/9#issuecomment-1994958719
|
2024-12-30 09:39:39 +00:00
|
|
|
-- font = wezterm.font {
|
|
|
|
|
-- family = "FiraCode Nerd Font Mono",
|
|
|
|
|
-- },
|
2023-11-25 20:50:19 +00:00
|
|
|
|
2024-12-30 09:39:39 +00:00
|
|
|
-- -- The nord theme to fit with everyting else
|
|
|
|
|
color_scheme = "Poimandres",
|
2024-09-04 17:20:25 +00:00
|
|
|
colors = {
|
|
|
|
|
tab_bar = {
|
2024-12-30 09:39:39 +00:00
|
|
|
background = theme.background,
|
2024-09-04 17:20:25 +00:00
|
|
|
active_tab = {
|
2024-12-30 09:39:39 +00:00
|
|
|
bg_color = "#88c0d0",
|
|
|
|
|
fg_color = theme.background,
|
2024-09-04 17:20:25 +00:00
|
|
|
},
|
|
|
|
|
inactive_tab = {
|
2024-12-30 09:39:39 +00:00
|
|
|
bg_color = theme.background,
|
|
|
|
|
fg_color = theme.foreground,
|
2024-09-04 17:20:25 +00:00
|
|
|
},
|
|
|
|
|
inactive_tab_hover = {
|
|
|
|
|
bg_color = "#4c566a",
|
2024-12-30 09:39:39 +00:00
|
|
|
fg_color = theme.foreground,
|
2024-09-04 17:20:25 +00:00
|
|
|
italic = false,
|
|
|
|
|
},
|
|
|
|
|
new_tab = {
|
2024-12-30 09:39:39 +00:00
|
|
|
bg_color = theme.background,
|
|
|
|
|
fg_color = theme.foreground,
|
2024-09-04 17:20:25 +00:00
|
|
|
},
|
|
|
|
|
new_tab_hover = {
|
|
|
|
|
bg_color = "#4c566a",
|
2024-12-30 09:39:39 +00:00
|
|
|
fg_color = theme.foreground,
|
2024-09-04 17:20:25 +00:00
|
|
|
italic = false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
2024-12-30 09:39:39 +00:00
|
|
|
default_prog = { 'nu' },
|
|
|
|
|
|
2024-09-04 17:20:25 +00:00
|
|
|
use_fancy_tab_bar = false,
|
2024-06-08 13:50:57 +00:00
|
|
|
|
2023-11-25 20:50:19 +00:00
|
|
|
-- Give the font some more line height, just makes thinks look a bit nicer
|
2024-04-10 18:20:42 +00:00
|
|
|
line_height = 1.4,
|
2023-11-25 20:50:19 +00:00
|
|
|
|
2024-06-08 13:50:57 +00:00
|
|
|
-- Remove the window boarders so we have a nice clean look
|
2024-12-30 09:39:39 +00:00
|
|
|
window_decorations = "RESIZE",
|
2024-06-08 13:50:57 +00:00
|
|
|
|
2023-11-25 20:50:19 +00:00
|
|
|
-- Who wants their music interrupted every time there is no tab completion
|
|
|
|
|
-- available in the shell, Who wants their music interrupted evert time there
|
|
|
|
|
-- is no tab completion available in the shell
|
|
|
|
|
audible_bell = "Disabled",
|
|
|
|
|
|
|
|
|
|
-- Have a really clean UI when there is only one tab open
|
2024-09-04 17:20:25 +00:00
|
|
|
hide_tab_bar_if_only_one_tab = false,
|
2023-11-25 20:50:19 +00:00
|
|
|
|
|
|
|
|
-- Disabled all the padding, this makes vim look a lot nicer when all the
|
|
|
|
|
-- window bars go to the edges of the terminal
|
2024-06-08 13:50:57 +00:00
|
|
|
window_padding = { left = 0, right = 0, top = 10, bottom = 0 },
|
2023-11-25 20:50:19 +00:00
|
|
|
|
2023-12-27 11:19:05 +00:00
|
|
|
warn_about_missing_glyphs = false,
|
|
|
|
|
|
2024-09-04 17:20:25 +00:00
|
|
|
tab_bar_at_bottom = true,
|
|
|
|
|
|
|
|
|
|
enable_wayland = true,
|
|
|
|
|
|
|
|
|
|
leader = { key = "b", mods = "CTRL" },
|
2024-05-03 06:52:49 +00:00
|
|
|
|
2023-11-25 20:50:19 +00:00
|
|
|
keys = {
|
|
|
|
|
-- Bind <CTRL-Backspace> to <CTRL-w> to `werase` in bash. This is to keep
|
|
|
|
|
-- the terminal binding the same to delete a word. The default <CTRL-w> has
|
|
|
|
|
-- the unfortunate conflicting key biding with close tab in chrome. Moving
|
|
|
|
|
-- muscle memory away from <CTRL-w> will be a game changer for me.
|
|
|
|
|
{
|
|
|
|
|
mods = "CTRL",
|
|
|
|
|
key = "Backspace",
|
|
|
|
|
action = wezterm.action.SendKey { mods = "CTRL", key = "w" },
|
|
|
|
|
},
|
2024-09-04 17:20:25 +00:00
|
|
|
|
|
|
|
|
-- tmux features to complete
|
|
|
|
|
-- - Fuzzy finding / switching between pains
|
|
|
|
|
-- - Prompt search back
|
|
|
|
|
-- - Find out the copy and pasteing story
|
|
|
|
|
-- - Is there a "copy mode" like in tmux?
|
|
|
|
|
-- - Nvim split navigation intergation
|
|
|
|
|
|
|
|
|
|
-- Pane navigation like vim, this is what I have been using in tmux and how
|
|
|
|
|
-- the finger move
|
|
|
|
|
vim_pass_though_action { key = "h", mods = "CTRL", direction = "Left" },
|
|
|
|
|
vim_pass_though_action { key = "j", mods = "CTRL", direction = "Down" },
|
|
|
|
|
vim_pass_though_action { key = "k", mods = "CTRL", direction = "Up" },
|
|
|
|
|
vim_pass_though_action { key = "l", mods = "CTRL", direction = "Right" },
|
|
|
|
|
|
|
|
|
|
-- Split panes with the tmux keys. Again this alrady uses the same
|
|
|
|
|
-- directory as the current pane. Again no shinanigans needed
|
|
|
|
|
{ key = "s", mods = "LEADER", action = wezterm.action { SplitVertical = { domain = "CurrentPaneDomain" } } },
|
|
|
|
|
{ key = "v", mods = "LEADER", action = wezterm.action { SplitHorizontal = { domain = "CurrentPaneDomain" } } },
|
|
|
|
|
|
|
|
|
|
-- Tab navigation via numbers. This already starts a 1 so we don't need
|
|
|
|
|
-- todo any shinangans to make that work better
|
|
|
|
|
{ key = "1", mods = "LEADER", action = wezterm.action { ActivateTab = 0 } },
|
|
|
|
|
{ key = "2", mods = "LEADER", action = wezterm.action { ActivateTab = 1 } },
|
|
|
|
|
{ key = "3", mods = "LEADER", action = wezterm.action { ActivateTab = 2 } },
|
|
|
|
|
{ key = "4", mods = "LEADER", action = wezterm.action { ActivateTab = 3 } },
|
|
|
|
|
{ key = "5", mods = "LEADER", action = wezterm.action { ActivateTab = 4 } },
|
|
|
|
|
{ key = "6", mods = "LEADER", action = wezterm.action { ActivateTab = 5 } },
|
|
|
|
|
{ key = "7", mods = "LEADER", action = wezterm.action { ActivateTab = 6 } },
|
|
|
|
|
{ key = "8", mods = "LEADER", action = wezterm.action { ActivateTab = 7 } },
|
|
|
|
|
{ key = "9", mods = "LEADER", action = wezterm.action { ActivateTab = 8 } },
|
2024-11-28 18:01:38 +00:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
key = "b",
|
|
|
|
|
mods = "LEADER|CTRL",
|
|
|
|
|
action = wezterm.action.ActivateLastTab,
|
|
|
|
|
},
|
2023-11-25 20:50:19 +00:00
|
|
|
},
|
|
|
|
|
}
|