2021-04-01 16:02:19 +02:00
|
|
|
local wezterm = require 'wezterm';
|
|
|
|
|
2021-04-01 19:31:44 +02:00
|
|
|
local editPanes = {};
|
|
|
|
local editMarker = ":nvim";
|
|
|
|
|
2021-07-20 10:02:27 +02:00
|
|
|
local padding = 8;
|
|
|
|
|
2021-04-01 19:31:44 +02:00
|
|
|
-- Window titles are a perfectly fine IPC mechanism 😁
|
|
|
|
|
|
|
|
wezterm.on("update-right-status", function(window, pane)
|
|
|
|
local title = pane:get_title();
|
|
|
|
local pid = pane:pane_id();
|
|
|
|
if editPanes[pid] ~= title and title:sub(-#editMarker) == editMarker then
|
|
|
|
editPanes[pid] = title;
|
|
|
|
window:perform_action(wezterm.action{ActivateTab=0}, pane);
|
|
|
|
end
|
|
|
|
end);
|
|
|
|
|
2021-04-01 16:02:19 +02:00
|
|
|
function font_with_fallback(name, params)
|
2021-04-02 14:47:31 +02:00
|
|
|
local names = {name, "Noto Color Emoji", "Iosevka Nerd Font Mono"}
|
2021-04-01 16:02:19 +02:00
|
|
|
return wezterm.font_with_fallback(names, params)
|
|
|
|
end
|
|
|
|
|
2021-04-03 10:19:45 +02:00
|
|
|
local themeShelmanDark = {
|
|
|
|
colors = {
|
|
|
|
foreground = "#ded9ce",
|
2021-04-03 10:38:18 +02:00
|
|
|
background = "#171a23",
|
2021-04-03 10:19:45 +02:00
|
|
|
cursor_bg = "#FB8C00",
|
|
|
|
cursor_border = "#FB8C00",
|
|
|
|
split = "#444444",
|
|
|
|
ansi = { "#000000", "#ff605a", "#b1e869", "#ead89c", "#5da9f6", "#e86aff", "#82fff6", "#ded9ce" },
|
|
|
|
brights = { "#313131", "#f58b7f", "#dcf88f", "#eee5b2", "#a5c7ff", "#ddaaff", "#b6fff9", "#fefffe" },
|
|
|
|
tab_bar = {
|
|
|
|
background = "#000000",
|
2021-04-03 10:38:18 +02:00
|
|
|
active_tab = { bg_color = "#171a23", fg_color = "#c0b070", intensity = "Normal", },
|
2021-04-03 10:19:45 +02:00
|
|
|
inactive_tab = { bg_color = "#000000", fg_color = "#c0c0c0", intensity = "Half", },
|
|
|
|
inactive_tab_hover = { bg_color = "#333333", fg_color = "#909090", italic = true, }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
tab_bar_style = {
|
2021-04-03 10:38:18 +02:00
|
|
|
active_tab_left = wezterm.format({ {Background={Color="#171a23"}}, {Foreground={Color="#000000"}}, {Text=" "} }),
|
|
|
|
active_tab_right = wezterm.format({ {Background={Color="#171a23"}}, {Foreground={Color="#000000"}}, {Text=" "} }),
|
|
|
|
inactive_tab_left = wezterm.format({ {Background={Color="#000000"}}, {Foreground={Color="#171a23"}}, {Text=" "} }),
|
|
|
|
inactive_tab_right = wezterm.format({ {Background={Color="#000000"}}, {Foreground={Color="#171a23"}}, {Text="▕"} }),
|
|
|
|
inactive_tab_hover_left = wezterm.format({ {Background={Color="#333333"}}, {Foreground={Color="#ffffff"}}, {Text=" "} }),
|
|
|
|
inactive_tab_hover_right = wezterm.format({ {Background={Color="#333333"}}, {Foreground={Color="#ffffff"}}, {Text=" "} }),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
local themeShelmanLight = {
|
|
|
|
colors = {
|
|
|
|
foreground = "#000000",
|
2021-04-15 20:47:06 +02:00
|
|
|
background = "#fcfcfc",
|
|
|
|
cursor_bg = "#ff3300",
|
|
|
|
cursor_fg = "#ffffff",
|
|
|
|
cursor_border = "#cc0000",
|
2021-07-12 09:08:30 +02:00
|
|
|
selection_bg = "#FFEA00",
|
2021-04-03 10:38:18 +02:00
|
|
|
split = "#444444",
|
2021-07-12 09:02:46 +02:00
|
|
|
selection_bg = "#FFCA28",
|
2021-04-15 14:41:33 +02:00
|
|
|
ansi = { "#212121", "#b7141e", "#457b23", "#f5971d", "#134eb2", "#550087", "#0e707c", "#eeeeee" },
|
|
|
|
brights = { "#424242", "#e83a3f", "#7aba39", "#fee92e", "#53a4f3", "#a94dbb", "#26bad1", "#d8d8d8" },
|
|
|
|
|
2021-04-03 10:38:18 +02:00
|
|
|
tab_bar = {
|
2021-04-15 14:41:33 +02:00
|
|
|
background = "#556677",
|
2021-04-03 10:38:18 +02:00
|
|
|
active_tab = { bg_color = "#f7f7f7", fg_color = "#000000", intensity = "Normal", },
|
2021-04-15 14:41:33 +02:00
|
|
|
inactive_tab = { bg_color = "#778899", fg_color = "#000000", intensity = "Half", },
|
2021-04-03 10:38:18 +02:00
|
|
|
inactive_tab_hover = { bg_color = "#333333", fg_color = "#909090", italic = true, }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
tab_bar_style = {
|
|
|
|
active_tab_left = wezterm.format({ {Background={Color="#f7f7f7"}}, {Foreground={Color="#000000"}}, {Text=" "} }),
|
|
|
|
active_tab_right = wezterm.format({ {Background={Color="#f7f7f7"}}, {Foreground={Color="#000000"}}, {Text=" "} }),
|
2021-04-15 14:41:33 +02:00
|
|
|
inactive_tab_left = wezterm.format({ {Background={Color="#778899"}}, {Foreground={Color="#f7f7f7"}}, {Text=" "} }),
|
|
|
|
inactive_tab_right = wezterm.format({ {Background={Color="#778899"}}, {Foreground={Color="#333333"}}, {Text="▕"} }),
|
2021-04-03 10:19:45 +02:00
|
|
|
inactive_tab_hover_left = wezterm.format({ {Background={Color="#333333"}}, {Foreground={Color="#ffffff"}}, {Text=" "} }),
|
|
|
|
inactive_tab_hover_right = wezterm.format({ {Background={Color="#333333"}}, {Foreground={Color="#ffffff"}}, {Text=" "} }),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-04-15 14:41:33 +02:00
|
|
|
local theme = themeShelmanLight;
|
2021-04-03 10:19:45 +02:00
|
|
|
|
2021-04-01 16:02:19 +02:00
|
|
|
return {
|
2021-04-03 10:19:45 +02:00
|
|
|
colors = theme.colors,
|
|
|
|
tab_bar_style = theme.tab_bar_style,
|
2021-04-01 19:31:44 +02:00
|
|
|
-- automatically_reload_config = false,
|
2021-04-15 14:41:33 +02:00
|
|
|
font = font_with_fallback("Iosevka Term SS09", {weight="Regular"}),
|
|
|
|
-- font = wezterm.font("Iosevka Term SS09", {weight="Regular"}),
|
2021-04-01 16:02:19 +02:00
|
|
|
font_rules = {
|
|
|
|
{
|
|
|
|
italic = false,
|
|
|
|
intensity = "Half",
|
2021-04-15 14:41:33 +02:00
|
|
|
font = font_with_fallback("Iosevka Term SS09", {weight="Thin"})
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
italic = true,
|
|
|
|
intensity = "Normal",
|
2021-04-19 16:40:46 +02:00
|
|
|
-- font = font_with_fallback("Iosevka Aile", {weight="Regular", italic=true})
|
|
|
|
font = font_with_fallback("Iosevka Term Curly Slab", {weight="Regular", italic=true})
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
italic = true,
|
|
|
|
intensity = "Bold",
|
2021-04-15 14:41:33 +02:00
|
|
|
font = font_with_fallback("Iosevka Term Curly Slab", {weight="Light", italic=true})
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
intensity = "Bold",
|
2021-04-15 14:41:33 +02:00
|
|
|
font = font_with_fallback("Iosevka Term SS09", {weight="DemiBold"})
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
},
|
2021-04-15 14:41:33 +02:00
|
|
|
-- freetype_load_target = "HorizontalLcd",
|
|
|
|
freetype_load_target = "Light",
|
2021-04-15 20:47:06 +02:00
|
|
|
-- freetype_interpreter_version = 40,
|
|
|
|
-- freetype_load_flags = "FORCE_AUTOHINT",
|
2021-07-12 09:02:46 +02:00
|
|
|
warn_about_missing_glyphs = false,
|
2021-04-15 14:41:33 +02:00
|
|
|
|
|
|
|
bold_brightens_ansi_colors = false,
|
2021-04-01 16:02:19 +02:00
|
|
|
|
2021-04-28 09:53:35 +02:00
|
|
|
font_size = 13.0,
|
2021-08-26 16:23:55 +02:00
|
|
|
line_height = 1.0,
|
2021-04-01 16:02:19 +02:00
|
|
|
|
2021-07-12 09:08:30 +02:00
|
|
|
initial_cols = 100,
|
|
|
|
initial_rows = 55,
|
2021-04-01 16:02:19 +02:00
|
|
|
window_padding = {
|
2021-07-20 10:02:27 +02:00
|
|
|
left = padding,
|
|
|
|
right = padding,
|
|
|
|
top = padding,
|
|
|
|
bottom = padding,
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
|
2021-07-12 09:02:46 +02:00
|
|
|
enable_tab_bar = false,
|
2021-04-27 14:36:57 +02:00
|
|
|
tab_bar_at_bottom = true,
|
2021-04-02 17:31:47 +02:00
|
|
|
show_tab_index_in_tab_bar = true,
|
2021-04-01 16:02:19 +02:00
|
|
|
enable_scroll_bar = false,
|
2021-04-15 20:47:06 +02:00
|
|
|
window_decorations = "RESIZE",
|
2021-04-01 16:02:19 +02:00
|
|
|
scrollback_lines = 5000,
|
2021-04-01 19:31:44 +02:00
|
|
|
alternate_buffer_wheel_scroll_speed = 2,
|
2021-04-01 16:02:19 +02:00
|
|
|
check_for_updates = false,
|
2021-04-01 19:31:44 +02:00
|
|
|
status_update_interval = 100,
|
|
|
|
|
2021-04-15 14:41:33 +02:00
|
|
|
term = "wezterm",
|
|
|
|
|
2021-04-02 14:47:31 +02:00
|
|
|
launch_menu = {
|
|
|
|
{
|
|
|
|
label = "dln-dev",
|
|
|
|
args = {"ssh", "dln-dev"},
|
|
|
|
},
|
|
|
|
},
|
2021-04-01 16:02:19 +02:00
|
|
|
|
2021-11-11 09:36:24 +01:00
|
|
|
disable_default_key_bindings = true,
|
|
|
|
|
2021-07-12 09:02:46 +02:00
|
|
|
leader = { key="o", mods="CTRL|SHIFT", timeout_milliseconds=1000 },
|
2021-04-01 16:02:19 +02:00
|
|
|
keys = {
|
2021-04-01 19:31:44 +02:00
|
|
|
|
|
|
|
{key="c", mods="ALT|SHIFT", action="Copy"},
|
|
|
|
{key="v", mods="ALT|SHIFT", action="Paste"},
|
|
|
|
{key="n", mods="LEADER", action=wezterm.action{SpawnTab="CurrentPaneDomain"}},
|
|
|
|
{key="c", mods="LEADER", action=wezterm.action{SpawnTab="CurrentPaneDomain"}},
|
|
|
|
{key="k", mods="LEADER", action=wezterm.action{CloseCurrentTab={confirm=true}}},
|
2021-04-02 14:47:31 +02:00
|
|
|
{key="l", mods="LEADER", action="ShowLauncher"},
|
2021-04-01 19:31:44 +02:00
|
|
|
|
2021-11-11 09:36:24 +01:00
|
|
|
{key="-", mods="CTRL", action="DecreaseFontSize"},
|
|
|
|
{key="=", mods="CTRL", action="IncreaseFontSize"},
|
2022-01-09 20:21:30 +01:00
|
|
|
{key="Enter", mods="ALT", action="ToggleFullScreen"},
|
2021-11-11 09:36:24 +01:00
|
|
|
|
2021-08-26 16:23:55 +02:00
|
|
|
--[[
|
2021-04-01 19:31:44 +02:00
|
|
|
{key="LeftArrow", mods="CTRL", action=wezterm.action{ActivateTabRelative=-1}},
|
|
|
|
{key="RightArrow", mods="CTRL", action=wezterm.action{ActivateTabRelative=1}},
|
2021-04-02 17:35:50 +02:00
|
|
|
{key="RightArrow", mods="CTRL|SHIFT", action=wezterm.action{SpawnTab="CurrentPaneDomain"}},
|
2021-08-26 16:23:55 +02:00
|
|
|
]]
|
2021-04-01 19:31:44 +02:00
|
|
|
|
2021-07-12 09:02:46 +02:00
|
|
|
--[[ {key="1", mods="ALT", action=wezterm.action{ActivateTab=0}},
|
2021-04-01 19:31:44 +02:00
|
|
|
{key="2", mods="ALT", action=wezterm.action{ActivateTab=1}},
|
|
|
|
{key="3", mods="ALT", action=wezterm.action{ActivateTab=2}},
|
|
|
|
{key="4", mods="ALT", action=wezterm.action{ActivateTab=3}},
|
|
|
|
{key="5", mods="ALT", action=wezterm.action{ActivateTab=4}},
|
|
|
|
{key="6", mods="ALT", action=wezterm.action{ActivateTab=5}},
|
|
|
|
{key="7", mods="ALT", action=wezterm.action{ActivateTab=6}},
|
|
|
|
{key="8", mods="ALT", action=wezterm.action{ActivateTab=7}},
|
|
|
|
{key="9", mods="ALT", action=wezterm.action{ActivateTab=8}},
|
2021-07-12 09:02:46 +02:00
|
|
|
{key="0", mods="ALT", action=wezterm.action{ActivateTab=9}}, ]]
|
2021-04-01 16:02:19 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
2021-04-15 14:41:33 +02:00
|
|
|
-- ssh_domains = {
|
|
|
|
-- {
|
|
|
|
-- name = "dln-dev",
|
|
|
|
-- remote_address = "dln-dev",
|
|
|
|
-- username = "dln",
|
|
|
|
-- }
|
|
|
|
-- },
|
2021-04-02 17:31:47 +02:00
|
|
|
|
2021-04-01 16:02:19 +02:00
|
|
|
}
|