refactor
This commit is contained in:
parent
93f49e3227
commit
7edae4612e
|
@ -1,5 +1,5 @@
|
||||||
-- Pull in the wezterm API
|
-- Pull in the wezterm API
|
||||||
local wezterm = require 'wezterm'
|
local wezterm = require("wezterm")
|
||||||
local act = wezterm.action
|
local act = wezterm.action
|
||||||
|
|
||||||
-- This table will hold the configuration.
|
-- This table will hold the configuration.
|
||||||
|
@ -26,27 +26,23 @@ function tab_title(tab_info)
|
||||||
return tab_info.active_pane.title
|
return tab_info.active_pane.title
|
||||||
end
|
end
|
||||||
|
|
||||||
wezterm.on(
|
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
|
||||||
'format-tab-title',
|
|
||||||
function(tab, tabs, panes, config, hover, max_width)
|
|
||||||
local title = tab_title(tab)
|
local title = tab_title(tab)
|
||||||
return { { Text = ' ' .. title .. '' }, }
|
return { { Text = " " .. title .. "" } }
|
||||||
end
|
end)
|
||||||
)
|
|
||||||
|
|
||||||
-- Do not check for or show window with update information
|
-- Do not check for or show window with update information
|
||||||
config.check_for_updates = false
|
config.check_for_updates = false
|
||||||
config.show_update_window = false
|
|
||||||
|
|
||||||
--| Font Configuration
|
--| Font Configuration
|
||||||
config.font = wezterm.font 'Fisa Code'
|
config.font = wezterm.font("Fisa Code")
|
||||||
config.font_size = 10.0
|
config.font_size = 10.0
|
||||||
|
|
||||||
--| Color scheme
|
--| Color scheme
|
||||||
config.color_scheme = 'gruvbox_material_dark_hard'
|
config.color_scheme = "gruvbox_material_dark_hard"
|
||||||
|
|
||||||
--| Cursor style
|
--| Cursor style
|
||||||
config.default_cursor_style = 'SteadyBar'
|
config.default_cursor_style = "SteadyBar"
|
||||||
|
|
||||||
--| Padding
|
--| Padding
|
||||||
config.window_padding = {
|
config.window_padding = {
|
||||||
|
@ -75,44 +71,43 @@ config.colors = {
|
||||||
|
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
--| Tab Bar Colors
|
--| Tab Bar Colors
|
||||||
background = '#282828',
|
background = "#282828",
|
||||||
--| Tab Colors
|
--| Tab Colors
|
||||||
active_tab = { bg_color = '#282828', fg_color = '#7daea3', intensity = 'Normal', italic = false, },
|
active_tab = { bg_color = "#282828", fg_color = "#7daea3", intensity = "Normal", italic = false },
|
||||||
inactive_tab = { bg_color = '#282828', fg_color = '#a89984', intensity = 'Normal', italic = false, },
|
inactive_tab = { bg_color = "#282828", fg_color = "#a89984", intensity = "Normal", italic = false },
|
||||||
inactive_tab_hover = { bg_color = '#282828', fg_color = '#a89984', intensity = 'Normal', italic = false, },
|
inactive_tab_hover = { bg_color = "#282828", fg_color = "#a89984", intensity = "Normal", italic = false },
|
||||||
new_tab = { bg_color = '#282828', fg_color = '#a89984', intensity = 'Normal', italic = false, },
|
new_tab = { bg_color = "#282828", fg_color = "#a89984", intensity = "Normal", italic = false },
|
||||||
new_tab_hover = { bg_color = '#282828', fg_color = '#a89984', intensity = 'Normal', italic = false, },
|
new_tab_hover = { bg_color = "#282828", fg_color = "#a89984", intensity = "Normal", italic = false },
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--| Key Assignments
|
--| Key Assignments
|
||||||
config.disable_default_key_bindings = true
|
config.disable_default_key_bindings = true
|
||||||
config.keys = {
|
config.keys = {
|
||||||
--| Spawn Tab
|
--| Spawn Tab
|
||||||
{ key = 'n', mods = 'ALT', action = act.SpawnTab 'CurrentPaneDomain', },
|
{ key = "n", mods = "ALT", action = act.SpawnTab("CurrentPaneDomain") },
|
||||||
--| Tab Navigation
|
--| Tab Navigation
|
||||||
{ key = 'LeftArrow', mods = 'ALT', action = act.ActivateTabRelative(-1) },
|
{ key = "LeftArrow", mods = "ALT", action = act.ActivateTabRelative(-1) },
|
||||||
{ key = 'RightArrow', mods = 'ALT', action = act.ActivateTabRelative(1) },
|
{ key = "RightArrow", mods = "ALT", action = act.ActivateTabRelative(1) },
|
||||||
|
|
||||||
--| Split Panes
|
--| Split Panes
|
||||||
{ key = 'v', mods = 'ALT', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, },
|
{ key = "v", mods = "ALT", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
||||||
{ key = 's', mods = 'ALT', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, },
|
{ key = "s", mods = "ALT", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||||
--| Adjust Pane Size
|
--| Adjust Pane Size
|
||||||
{ key = 'PageDown', mods = 'ALT', action = act.AdjustPaneSize { 'Down', 5 } },
|
{ key = "PageDown", mods = "ALT", action = act.AdjustPaneSize({ "Down", 5 }) },
|
||||||
{ key = 'PageUp', mods = 'ALT', action = act.AdjustPaneSize { 'Up', 5 } },
|
{ key = "PageUp", mods = "ALT", action = act.AdjustPaneSize({ "Up", 5 }) },
|
||||||
--| Pane Navigation
|
--| Pane Navigation
|
||||||
{ key = 'DownArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Next', },
|
{ key = "DownArrow", mods = "ALT", action = act.ActivatePaneDirection("Next") },
|
||||||
{ key = 'UpArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Prev', },
|
{ key = "UpArrow", mods = "ALT", action = act.ActivatePaneDirection("Prev") },
|
||||||
--| Close Pane
|
--| Close Pane
|
||||||
{ key = 'Escape', mods = "ALT", action = act.CloseCurrentPane { confirm = false }, },
|
{ key = "Escape", mods = "ALT", action = act.CloseCurrentPane({ confirm = false }) },
|
||||||
|
|
||||||
--| Copy Mode / Clipboard
|
--| Copy Mode / Clipboard
|
||||||
{ key = 'X', mods = 'CTRL', action = act.ActivateCopyMode, },
|
{ key = "X", mods = "CTRL", action = act.ActivateCopyMode },
|
||||||
{ key = 'V', mods = 'CTRL', action = act.PasteFrom 'Clipboard', },
|
{ key = "V", mods = "CTRL", action = act.PasteFrom("Clipboard") },
|
||||||
|
|
||||||
--| This lets us unify delete word across programs
|
--| This lets us unify delete word across programs
|
||||||
{ key = 'Backspace', mods = 'CTRL', action = act.SendKey {key = 'w', mods = 'CTRL'} },
|
{ key = "Backspace", mods = "CTRL", action = act.SendKey({ key = "w", mods = "CTRL" }) },
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue