First commit
This commit is contained in:
commit
847c9e64c0
51 changed files with 4058 additions and 0 deletions
33
.config/wezterm/colors/sonokai_andromeda.toml
Normal file
33
.config/wezterm/colors/sonokai_andromeda.toml
Normal file
|
@ -0,0 +1,33 @@
|
|||
[colors]
|
||||
foreground = "#e1e3e4"
|
||||
background = "#2b2d3a"
|
||||
selection_bg = "#3a3e4e"
|
||||
selection_fg = "#c0caf5"
|
||||
cursor_fg = "#2b2d3a"
|
||||
cursor_bg = "#e1e3e4"
|
||||
cursor_border = "#e1e3e4"
|
||||
|
||||
ansi = ["#181a1c","#fb617e","#9ed06c","#f0c362","#6dcae8","#bb97ee","#f89860","#e1e3e4"]
|
||||
brights = ["#7e8294","#fb617e","#9ed06c","#f0c362","#6dcae8","#bb97ee","#f89860","#e1e3e4"]
|
||||
|
||||
[colors.tab_bar]
|
||||
inactive_tab_edge = "#e1e3e4"
|
||||
background = "#2b2d3a"
|
||||
|
||||
[colors.tab_bar.inactive_tab]
|
||||
fg_color = "#e1e3e4"
|
||||
bg_color = "#7e8294"
|
||||
|
||||
[colors.tab_bar.inactive_tab_hover]
|
||||
fg_color = "#e1e3e4"
|
||||
bg_color = "#7e8294"
|
||||
|
||||
[colors.tab_bar.active_tab]
|
||||
fg_color = "#7e8294"
|
||||
bg_color = "#e1e3e4"
|
||||
intensity = "Bold"
|
||||
|
||||
[metadata]
|
||||
aliases = []
|
||||
author = "jdugan"
|
||||
name = "sonokai_andromeda"
|
34
.config/wezterm/config/appearance.lua
Normal file
34
.config/wezterm/config/appearance.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
local config = {}
|
||||
|
||||
-- color scheme
|
||||
config.color_scheme = "Everforest Dark Soft (Gogh)"
|
||||
-- font
|
||||
config.font = wezterm.font("Fantasque Sans Mono")
|
||||
config.font_size = 14.0
|
||||
-- Ligatures in terminal/programming fonts IMO are a bad idea,
|
||||
-- as they require the user to mentally translate what the ligature represents,
|
||||
-- and in some cases, they misrepresent code semantics due to ligature substitution
|
||||
-- being a dumb search/replace regardless of the context.
|
||||
-- != isn't the not equal to operator in Lua for instance (that would be ~=),
|
||||
-- but ligature fonts will render it as ≠ regardless, even in a string literal.
|
||||
-- Even worse, some fonts also render <= and =< both as ≤, since there are languages
|
||||
-- that use one or the other, even though only one is correct for any given language,
|
||||
-- causing unnecessary ambiguity.
|
||||
-- It's not a big deal, ultimately, but disabling ligatures avoids the above problems.
|
||||
config.harfbuzz_features = { "calt=0", "clig=0", "liga=0" }
|
||||
-- tab bar
|
||||
config.show_new_tab_button_in_tab_bar = false
|
||||
config.use_fancy_tab_bar = false
|
||||
-- graphics
|
||||
config.front_end = "WebGpu"
|
||||
-- inactive panes
|
||||
config.inactive_pane_hsb = {
|
||||
saturation = 0.9,
|
||||
brightness = 0.5
|
||||
}
|
||||
-- scrollbar
|
||||
config.enable_scroll_bar = true
|
||||
|
||||
return config
|
127
.config/wezterm/config/bindings.lua
Normal file
127
.config/wezterm/config/bindings.lua
Normal file
|
@ -0,0 +1,127 @@
|
|||
local wezterm = require("wezterm")
|
||||
local act = wezterm.action
|
||||
|
||||
local keys = {
|
||||
-- Tab Management
|
||||
{ key = "T", mods = "SHIFT|CTRL", action = act.SpawnTab "CurrentPaneDomain" },
|
||||
{
|
||||
key = "T",
|
||||
mods = "SHIFT|ALT",
|
||||
action = act.PromptInputLine {
|
||||
description = 'Enter new name for tab',
|
||||
action = wezterm.action_callback(function(window, _, line)
|
||||
if line then
|
||||
window:active_tab():set_title(line)
|
||||
end
|
||||
end)
|
||||
}
|
||||
},
|
||||
{ key = "W", mods = "SHIFT|CTRL", action = act.CloseCurrentTab { confirm = true } },
|
||||
{ key = "LeftArrow", mods = "ALT", action = act.ActivateTabRelative(-1) },
|
||||
{ key = "LeftArrow", mods = "SHIFT|ALT", action = act.MoveTabRelative(-1) },
|
||||
{ key = "RightArrow", mods = "ALT", action = act.ActivateTabRelative(1) },
|
||||
{ key = "RightArrow", mods = "SHIFT|ALT", action = act.MoveTabRelative(1) },
|
||||
-- Pane Management
|
||||
{ key = "-", mods = "CTRL|ALT", action = act.SplitVertical { domain = "CurrentPaneDomain" } },
|
||||
{ key = "\\", mods = "CTRL|ALT", action = act.SplitHorizontal { domain = "CurrentPaneDomain" } },
|
||||
{ key = "LeftArrow", mods = "CTRL", action = act.ActivatePaneDirection "Left" },
|
||||
{ key = "LeftArrow", mods = "CTRL|SHIFT", action = act.AdjustPaneSize { "Left", 1 } },
|
||||
{ key = "RightArrow", mods = "CTRL", action = act.ActivatePaneDirection "Right" },
|
||||
{ key = "RightArrow", mods = "CTRL|SHIFT", action = act.AdjustPaneSize { "Right", 1 } },
|
||||
{ key = "UpArrow", mods = "CTRL", action = act.ActivatePaneDirection "Up" },
|
||||
{ key = "UpArrow", mods = "CTRL|SHIFT", action = act.AdjustPaneSize { "Up", 1 } },
|
||||
{ key = "DownArrow", mods = "CTRL", action = act.ActivatePaneDirection "Down" },
|
||||
{ key = "DownArrow", mods = "CTRL|SHIFT", action = act.AdjustPaneSize { "Down", 1 } },
|
||||
-- Default Actions
|
||||
{ key = "_", mods = "SHIFT|CTRL", action = act.DecreaseFontSize },
|
||||
{ key = "+", mods = "SHIFT|CTRL", action = act.IncreaseFontSize },
|
||||
{ key = "C", mods = "SHIFT|CTRL", action = act.CopyTo "Clipboard" },
|
||||
{ key = "F", mods = "SHIFT|CTRL", action = act.Search "CurrentSelectionOrEmptyString" },
|
||||
{ key = "K", mods = "SHIFT|CTRL", action = act.ClearScrollback "ScrollbackOnly" },
|
||||
{ key = "L", mods = "SHIFT|CTRL", action = act.ShowDebugOverlay },
|
||||
{ key = "R", mods = "SHIFT|CTRL", action = act.ReloadConfiguration },
|
||||
{ key = "V", mods = "SHIFT|CTRL", action = act.PasteFrom "Clipboard" },
|
||||
{ key = "X", mods = "SHIFT|CTRL", action = act.ActivateCopyMode },
|
||||
{ key = "Z", mods = "SHIFT|CTRL", action = act.TogglePaneZoomState },
|
||||
{ key = "phys:Space", mods = "SHIFT|CTRL", action = act.QuickSelect },
|
||||
{ key = "PageUp", mods = "SHIFT", action = act.ScrollByPage(-1) },
|
||||
{ key = "PageDown", mods = "SHIFT", action = act.ScrollByPage(1) },
|
||||
{ key = "Insert", mods = "SHIFT", action = act.PasteFrom "PrimarySelection" },
|
||||
{ key = "Insert", mods = "CTRL", action = act.CopyTo "PrimarySelection" },
|
||||
{ key = "Copy", mods = "NONE", action = act.CopyTo "Clipboard" },
|
||||
{ key = "Paste", mods = "NONE", action = act.PasteFrom "Clipboard" },
|
||||
}
|
||||
|
||||
local key_tables = {
|
||||
copy_mode = {
|
||||
{ key = "Tab", mods = "NONE", action = act.CopyMode "MoveForwardWord" },
|
||||
{ key = "Tab", mods = "SHIFT", action = act.CopyMode "MoveBackwardWord" },
|
||||
{ key = "Enter", mods = "NONE", action = act.CopyMode "MoveToStartOfNextLine" },
|
||||
{ key = "Escape", mods = "NONE", action = act.CopyMode "Close" },
|
||||
{ key = "Space", mods = "NONE", action = act.CopyMode { SetSelectionMode = "Cell" } },
|
||||
{ key = "$", mods = "NONE", action = act.CopyMode "MoveToEndOfLineContent" },
|
||||
{ key = "$", mods = "SHIFT", action = act.CopyMode "MoveToEndOfLineContent" },
|
||||
{ key = "0", mods = "NONE", action = act.CopyMode "MoveToStartOfLine" },
|
||||
{ key = "G", mods = "NONE", action = act.CopyMode "MoveToScrollbackBottom" },
|
||||
{ key = "G", mods = "SHIFT", action = act.CopyMode "MoveToScrollbackBottom" },
|
||||
{ key = "H", mods = "NONE", action = act.CopyMode "MoveToViewportTop" },
|
||||
{ key = "H", mods = "SHIFT", action = act.CopyMode "MoveToViewportTop" },
|
||||
{ key = "L", mods = "NONE", action = act.CopyMode "MoveToViewportBottom" },
|
||||
{ key = "L", mods = "SHIFT", action = act.CopyMode "MoveToViewportBottom" },
|
||||
{ key = "M", mods = "NONE", action = act.CopyMode "MoveToViewportMiddle" },
|
||||
{ key = "M", mods = "SHIFT", action = act.CopyMode "MoveToViewportMiddle" },
|
||||
{ key = "O", mods = "NONE", action = act.CopyMode "MoveToSelectionOtherEndHoriz" },
|
||||
{ key = "O", mods = "SHIFT", action = act.CopyMode "MoveToSelectionOtherEndHoriz" },
|
||||
{ key = "V", mods = "NONE", action = act.CopyMode { SetSelectionMode = "Line" } },
|
||||
{ key = "V", mods = "SHIFT", action = act.CopyMode { SetSelectionMode = "Line" } },
|
||||
{ key = "^", mods = "NONE", action = act.CopyMode "MoveToStartOfLineContent" },
|
||||
{ key = "^", mods = "SHIFT", action = act.CopyMode "MoveToStartOfLineContent" },
|
||||
{ key = "b", mods = "NONE", action = act.CopyMode "MoveBackwardWord" },
|
||||
{ key = "b", mods = "ALT", action = act.CopyMode "MoveBackwardWord" },
|
||||
{ key = "b", mods = "CTRL", action = act.CopyMode "PageUp" },
|
||||
{ key = "c", mods = "CTRL", action = act.CopyMode "Close" },
|
||||
{ key = "f", mods = "ALT", action = act.CopyMode "MoveForwardWord" },
|
||||
{ key = "f", mods = "CTRL", action = act.CopyMode "PageDown" },
|
||||
{ key = "g", mods = "NONE", action = act.CopyMode "MoveToScrollbackTop" },
|
||||
{ key = "g", mods = "CTRL", action = act.CopyMode "Close" },
|
||||
{ key = "h", mods = "NONE", action = act.CopyMode "MoveLeft" },
|
||||
{ key = "j", mods = "NONE", action = act.CopyMode "MoveDown" },
|
||||
{ key = "k", mods = "NONE", action = act.CopyMode "MoveUp" },
|
||||
{ key = "l", mods = "NONE", action = act.CopyMode "MoveRight" },
|
||||
{ key = "m", mods = "ALT", action = act.CopyMode "MoveToStartOfLineContent" },
|
||||
{ key = "o", mods = "NONE", action = act.CopyMode "MoveToSelectionOtherEnd" },
|
||||
{ key = "q", mods = "NONE", action = act.CopyMode "Close" },
|
||||
{ key = "v", mods = "NONE", action = act.CopyMode { SetSelectionMode = "Cell" } },
|
||||
{ key = "v", mods = "CTRL", action = act.CopyMode { SetSelectionMode = "Block" } },
|
||||
{ key = "w", mods = "NONE", action = act.CopyMode "MoveForwardWord" },
|
||||
{ key = "y", mods = "NONE", action = act.Multiple { { CopyTo = "ClipboardAndPrimarySelection" }, { CopyMode = "Close" } } },
|
||||
{ key = "PageUp", mods = "NONE", action = act.CopyMode "PageUp" },
|
||||
{ key = "PageDown", mods = "NONE", action = act.CopyMode "PageDown" },
|
||||
{ key = "LeftArrow", mods = "NONE", action = act.CopyMode "MoveLeft" },
|
||||
{ key = "LeftArrow", mods = "ALT", action = act.CopyMode "MoveBackwardWord" },
|
||||
{ key = "RightArrow", mods = "NONE", action = act.CopyMode "MoveRight" },
|
||||
{ key = "RightArrow", mods = "ALT", action = act.CopyMode "MoveForwardWord" },
|
||||
{ key = "UpArrow", mods = "NONE", action = act.CopyMode "MoveUp" },
|
||||
{ key = "DownArrow", mods = "NONE", action = act.CopyMode "MoveDown" },
|
||||
},
|
||||
|
||||
search_mode = {
|
||||
{ key = "Enter", mods = "NONE", action = act.CopyMode "PriorMatch" },
|
||||
{ key = "Escape", mods = "NONE", action = act.CopyMode "Close" },
|
||||
{ key = "n", mods = "CTRL", action = act.CopyMode "NextMatch" },
|
||||
{ key = "p", mods = "CTRL", action = act.CopyMode "PriorMatch" },
|
||||
{ key = "r", mods = "CTRL", action = act.CopyMode "CycleMatchType" },
|
||||
{ key = "u", mods = "CTRL", action = act.CopyMode "ClearPattern" },
|
||||
{ key = "PageUp", mods = "NONE", action = act.CopyMode "PriorMatchPage" },
|
||||
{ key = "PageDown", mods = "NONE", action = act.CopyMode "NextMatchPage" },
|
||||
{ key = "UpArrow", mods = "NONE", action = act.CopyMode "PriorMatch" },
|
||||
{ key = "DownArrow", mods = "NONE", action = act.CopyMode "NextMatch" },
|
||||
}
|
||||
}
|
||||
|
||||
local config = {}
|
||||
config.keys = keys
|
||||
config.disable_default_key_bindings = true
|
||||
config.key_tables = key_tables
|
||||
|
||||
return config
|
11
.config/wezterm/config/general.lua
Normal file
11
.config/wezterm/config/general.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
local config = {}
|
||||
|
||||
config.audible_bell = "Disabled"
|
||||
config.ssh_backend = "LibSsh"
|
||||
config.check_for_updates = false
|
||||
config.exit_behavior = 'Close'
|
||||
config.exit_behavior_messaging = 'Verbose'
|
||||
config.status_update_interval = 25
|
||||
config.default_prog = { '/usr/local/bin/hilbish', '-l' }
|
||||
|
||||
return config
|
8
.config/wezterm/config/init.lua
Normal file
8
.config/wezterm/config/init.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
local util = require "util"
|
||||
|
||||
local config = {}
|
||||
util.merge_tables(config, require("config.appearance"))
|
||||
util.merge_tables(config, require("config.bindings"))
|
||||
util.merge_tables(config, require("config.general"))
|
||||
|
||||
return config
|
54
.config/wezterm/events/format_tab_title.lua
Normal file
54
.config/wezterm/events/format_tab_title.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
local wezterm = require("wezterm")
|
||||
local util = require("util")
|
||||
|
||||
local scheme = util.get_schemes()["Everforest Dark Soft (Gogh)"]
|
||||
|
||||
local function tab_title(tab_info)
|
||||
local title = tab_info.tab_title
|
||||
-- if the tab title is explicitly set, take that
|
||||
if title and #title > 0 then
|
||||
return title
|
||||
end
|
||||
-- Otherwise, use the title from the active pane
|
||||
-- in that tab
|
||||
return tab_info.active_pane.title
|
||||
end
|
||||
|
||||
wezterm.on(
|
||||
"format-tab-title",
|
||||
function(tab, _, _, _, hover, max_width)
|
||||
local LEFT_CIRCLE = ""
|
||||
local RIGHT_CIRCLE = ""
|
||||
|
||||
local edge_background = scheme.background
|
||||
local background = scheme.brights[1]
|
||||
local foreground = scheme.brights[8]
|
||||
|
||||
-- ensure that the titles fit in the available space,
|
||||
-- and that we have room for the edges.
|
||||
local title = tab_title(tab)
|
||||
title = wezterm.truncate_right(title, max_width - 2)
|
||||
|
||||
if tab.is_active then
|
||||
background = scheme.ansi[8]
|
||||
foreground = scheme.ansi[1]
|
||||
elseif hover then
|
||||
background = scheme.brights[1]
|
||||
foreground = scheme.brights[8]
|
||||
end
|
||||
|
||||
local edge_foreground = background
|
||||
|
||||
return {
|
||||
{ Background = { Color = edge_background } },
|
||||
{ Foreground = { Color = edge_foreground } },
|
||||
{ Text = LEFT_CIRCLE },
|
||||
{ Background = { Color = background } },
|
||||
{ Foreground = { Color = foreground } },
|
||||
{ Text = title },
|
||||
{ Background = { Color = edge_background } },
|
||||
{ Foreground = { Color = edge_foreground } },
|
||||
{ Text = RIGHT_CIRCLE },
|
||||
}
|
||||
end
|
||||
)
|
56
.config/wezterm/events/update_status.lua
Normal file
56
.config/wezterm/events/update_status.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
local wezterm = require("wezterm")
|
||||
local util = require("util")
|
||||
|
||||
local scheme = util.get_schemes()["Everforest Dark Soft (Gogh)"]
|
||||
|
||||
wezterm.on("update-status", function(window, pane)
|
||||
local right_status = {}
|
||||
|
||||
-- modes
|
||||
local modes = {
|
||||
copy_mode = { text = " COPY ", bg = scheme.brights[3] },
|
||||
search_mode = { text = " SEARCH ", bg = scheme.brights[4] }
|
||||
}
|
||||
local name = window:active_key_table()
|
||||
local mode_fmt = {}
|
||||
if name and modes[name] then
|
||||
mode_fmt = modes[name]
|
||||
table.insert(right_status, { Background = { Color = mode_fmt["bg"] } })
|
||||
table.insert(right_status, { Foreground = { Color = scheme.ansi[1] } })
|
||||
table.insert(right_status, { Attribute = { Intensity = "Bold" } })
|
||||
table.insert(right_status, { Attribute = { Italic = true } })
|
||||
table.insert(right_status, { Text = mode_fmt["text"] })
|
||||
end
|
||||
|
||||
-- cwd
|
||||
local cwd = pane:get_current_working_dir()
|
||||
local cwd_path = ""
|
||||
if cwd then
|
||||
cwd_path = cwd.file_path
|
||||
end
|
||||
|
||||
local home_dir = os.getenv("HOME")
|
||||
|
||||
local config_dir = os.getenv("XDG_CONFIG_HOME") or home_dir .. "/.config"
|
||||
if cwd_path:find(config_dir, 1, true) == 1 then
|
||||
cwd_path = string.gsub(cwd_path, config_dir, " ")
|
||||
end
|
||||
|
||||
local dev_dir = home_dir .. "/workspace"
|
||||
if cwd_path:find(dev_dir, 1, true) == 1 then
|
||||
cwd_path = string.gsub(cwd_path, dev_dir, " ")
|
||||
end
|
||||
|
||||
if home_dir and cwd_path:find(home_dir, 1, true) == 1 then
|
||||
cwd_path = string.gsub(cwd_path, home_dir, " ")
|
||||
end
|
||||
|
||||
table.insert(right_status, "ResetAttributes")
|
||||
table.insert(right_status, { Background = { Color = scheme.ansi[8] } })
|
||||
table.insert(right_status, { Foreground = { Color = scheme.ansi[1] } })
|
||||
table.insert(right_status, { Attribute = { Intensity = "Bold" } })
|
||||
table.insert(right_status, { Text = cwd_path })
|
||||
|
||||
|
||||
window:set_right_status(wezterm.format(right_status))
|
||||
end)
|
48
.config/wezterm/types/color.lua
Normal file
48
.config/wezterm/types/color.lua
Normal file
|
@ -0,0 +1,48 @@
|
|||
---@meta
|
||||
|
||||
local color = {}
|
||||
|
||||
---@param filename string
|
||||
---@param params? { fuzziness: number, num_colors: number, max_width: number, max_height: number, min_brightness: number, max_brightness: number, threshold: number, min_contrast: number }
|
||||
function color.extract_colors_from_image(filename, params) end
|
||||
|
||||
---@param h string | number
|
||||
---@param s string | number
|
||||
---@param l string | number
|
||||
---@param a string | number
|
||||
---@return _.wezterm.Color
|
||||
function color.from_hsla(h, s, l, a) end
|
||||
|
||||
---@return table<string, _.wezterm.Palette>
|
||||
function color.get_builtin_schemes() end
|
||||
|
||||
---@return _.wezterm.Palette
|
||||
function color.get_default_colors() end
|
||||
|
||||
---@param gradient _.wezterm.Gradient
|
||||
---@param num_colors number
|
||||
---@return _.wezterm.Color[]
|
||||
function color.gradient(gradient, num_colors) end
|
||||
|
||||
---@param file_name string
|
||||
---@return _.wezterm.Palette, _.wezterm.ColorSchemeMetaData
|
||||
function color.load_base16_scheme(file_name) end
|
||||
|
||||
---@param file_name string
|
||||
---@return _.wezterm.Palette, _.wezterm.ColorSchemeMetaData
|
||||
function color.load_scheme(file_name) end
|
||||
|
||||
---@param file_name string
|
||||
---@return _.wezterm.Palette, _.wezterm.ColorSchemeMetaData
|
||||
function color.load_terminal_sexy_scheme(file_name) end
|
||||
|
||||
---@param string string
|
||||
---@return _.wezterm.Color
|
||||
function color.parse(string) end
|
||||
|
||||
---@param colors _.wezterm.Palette
|
||||
---@param metadata _.wezterm.ColorSchemeMetaData
|
||||
---@param file_name string
|
||||
function color.save_scheme(colors, metadata, file_name) end
|
||||
|
||||
return color
|
27
.config/wezterm/types/gui.lua
Normal file
27
.config/wezterm/types/gui.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
---@meta
|
||||
|
||||
local gui = {}
|
||||
|
||||
---@return table<string, _.wezterm.KeyBinding[]>
|
||||
function gui.default_key_tables() end
|
||||
|
||||
---@return _.wezterm.KeyBinding[]
|
||||
function gui.default_keys() end
|
||||
|
||||
---@return _.wezterm.GpuInfo[]
|
||||
function gui.enumerate_gpus() end
|
||||
|
||||
---@return _.wezterm.Appearance
|
||||
function gui.get_appearance() end
|
||||
|
||||
---@param window_id number
|
||||
---@return _.wezterm.Window | nil
|
||||
function gui.gui_window_for_mux_window(window_id) end
|
||||
|
||||
---@return _.wezterm.Window[]
|
||||
function gui.gui_windows() end
|
||||
|
||||
---@return { active: _.wezterm.ScreenInformation, by_name: table<string, _.wezterm.ScreenInformation>, main: _.wezterm.ScreenInformation, origin_x: number, origin_y: number, virtual_height: number, virtual_width: number }
|
||||
function gui.screens() end
|
||||
|
||||
return gui
|
217
.config/wezterm/types/init.lua
Normal file
217
.config/wezterm/types/init.lua
Normal file
|
@ -0,0 +1,217 @@
|
|||
---@meta
|
||||
|
||||
---@class WezTerm
|
||||
local wezterm = {
|
||||
---@module 'wezterm.color'
|
||||
color = {},
|
||||
|
||||
---@module 'wezterm.gui'
|
||||
gui = {},
|
||||
|
||||
---@module 'wezterm.mux'
|
||||
mux = {},
|
||||
|
||||
---@module 'wezterm.procinfo'
|
||||
procinfo = {},
|
||||
|
||||
---@module 'wezterm.time'
|
||||
time = {},
|
||||
|
||||
---@type table<string, any>
|
||||
GLOBAL = {},
|
||||
|
||||
---@type _.wezterm.KeyAssignment
|
||||
action = {},
|
||||
|
||||
---@type string
|
||||
config_dir = '',
|
||||
|
||||
---@type string
|
||||
config_file = '',
|
||||
|
||||
---@type string
|
||||
executable_dir = '',
|
||||
|
||||
---@type string
|
||||
home_dir = '',
|
||||
|
||||
---@type table<string, string>
|
||||
nerdfonts = {},
|
||||
|
||||
---@type string
|
||||
target_triple = '',
|
||||
|
||||
---@type string
|
||||
version = '',
|
||||
|
||||
---@param callback _.wezterm.ActionCallback
|
||||
---@return _.wezterm._CallbackAction
|
||||
action_callback = function(callback) end,
|
||||
|
||||
---@param path string
|
||||
add_to_config_reload_watch_list = function(path) end,
|
||||
|
||||
---@param args string[]
|
||||
background_child_process = function(args) end,
|
||||
|
||||
---@return _.wezterm.BatteryInfo[]
|
||||
battery_info = function() end,
|
||||
|
||||
---@param string string
|
||||
---@return number
|
||||
column_width = function(string) end,
|
||||
|
||||
---@return _.wezterm.ConfigBuilder
|
||||
config_builder = function() end,
|
||||
|
||||
---@return _.wezterm.HyperlinkRule[]
|
||||
default_hyperlink_rules = function() end,
|
||||
|
||||
---@return _.wezterm.SshDomain[]
|
||||
default_ssh_domains = function() end,
|
||||
|
||||
---@return _.wezterm.WslDomain[]
|
||||
default_wsl_domains = function() end,
|
||||
|
||||
---@param event_name string
|
||||
---@param ... any
|
||||
---@return boolean
|
||||
emit = function(event_name, ...) end,
|
||||
|
||||
---@param ssh_config_file_name? string
|
||||
---@return table<string, string>
|
||||
enumerate_ssh_hosts = function(ssh_config_file_name) end,
|
||||
|
||||
---@param family string
|
||||
---@param attributes? _.wezterm.FontAttributes
|
||||
---@return _.wezterm._Font
|
||||
---@overload fun(attributes: _.wezterm.FontAttributesExtended): _.wezterm._Font
|
||||
font = function(family, attributes) end,
|
||||
|
||||
---@param families string[]
|
||||
---@param attributes? _.wezterm.FontAttributes
|
||||
---@return _.wezterm._Font
|
||||
---@overload fun(attributes: (string | _.wezterm.FontFallbackAttributesExtended)[]): _.wezterm._Font
|
||||
font_with_fallback = function(families, attributes) end,
|
||||
|
||||
---@param format_items _.wezterm.FormatItem[]
|
||||
---@return string
|
||||
format = function(format_items) end,
|
||||
|
||||
---@return table<string, _.wezterm.Palette>
|
||||
get_builtin_color_schemes = function() end,
|
||||
|
||||
---@param pattern string
|
||||
---@param relative_to? string
|
||||
---@return string[]
|
||||
glob = function(pattern, relative_to) end,
|
||||
|
||||
---@param gradient _.wezterm.Gradient
|
||||
---@param num_colors number
|
||||
---@return _.wezterm.Color[]
|
||||
gradient_colors = function(gradient, num_colors) end,
|
||||
|
||||
---@param name string
|
||||
---@return boolean
|
||||
has_action = function(name) end,
|
||||
|
||||
---@return string
|
||||
hostname = function() end,
|
||||
|
||||
---@param value any
|
||||
---@return string
|
||||
json_encode = function(value) end,
|
||||
|
||||
---@param arg string
|
||||
---@param ... any
|
||||
log_error = function(arg, ...) end,
|
||||
|
||||
---@param arg string
|
||||
---@param ... any
|
||||
log_info = function(arg, ...) end,
|
||||
|
||||
---@param arg string
|
||||
---@param ... any
|
||||
log_warn = function(arg, ...) end,
|
||||
|
||||
---@overload fun(event_name: 'format-tab-title', callback: fun(tab: _.wezterm.TabInformation, tabs: _.wezterm.TabInformation[], panes: _.wezterm.PaneInformation, config: table, hover: boolean, max_width: integer): string | _.wezterm.FormatItem[]): nil
|
||||
---@overload fun(event_name: 'update-right-status', callback: fun(window: _.wezterm.Window, pane: _.wezterm.Pane): nil): nil
|
||||
---@overload fun(event_name: 'window-config-reloaded', callback: fun(window: _.wezterm.Window, pane: _.wezterm.Pane): nil): nil
|
||||
on = function(event_name, callback) end,
|
||||
|
||||
---@param path_or_url string
|
||||
---@param application? string
|
||||
open_with = function(path_or_url, application) end,
|
||||
|
||||
---@param string string
|
||||
---@param min_width number
|
||||
---@return string
|
||||
pad_left = function(string, min_width) end,
|
||||
|
||||
---@param string string
|
||||
---@param min_width number
|
||||
---@return string
|
||||
pad_right = function(string, min_width) end,
|
||||
|
||||
---@param table _.wezterm.MouseBindingBase
|
||||
---@return _.wezterm.MouseBinding ...
|
||||
---@overload fun(table: _.wezterm.KeyBindingBase): _.wezterm.KeyBinding ...
|
||||
permute_any_mods = function(table) end,
|
||||
|
||||
---@param table _.wezterm.MouseBindingBase
|
||||
---@return _.wezterm.MouseBinding ...
|
||||
---@overload fun(table: _.wezterm.KeyBindingBase): _.wezterm.KeyBinding ...
|
||||
permute_any_or_no_mods = function(table) end,
|
||||
|
||||
---@param path string
|
||||
---@return string[]
|
||||
read_dir = function(path) end,
|
||||
|
||||
reload_configuration = function() end,
|
||||
|
||||
---@param args string[]
|
||||
---@return boolean, string, string
|
||||
run_child_process = function(args) end,
|
||||
|
||||
---@return boolean
|
||||
running_under_wsl = function() end,
|
||||
|
||||
---@param args string[]
|
||||
---@return string
|
||||
shell_join_args = function(args) end,
|
||||
|
||||
---@param line string
|
||||
---@return string|string[]
|
||||
shell_quote_arg = function(line) end,
|
||||
|
||||
---@param milliseconds number
|
||||
sleep_ms = function(milliseconds) end,
|
||||
|
||||
---@param str string
|
||||
---@return string[]
|
||||
split_by_newlines = function(str) end,
|
||||
|
||||
---@param format string
|
||||
---@return string
|
||||
strftime = function(format) end,
|
||||
|
||||
---@param format string
|
||||
---@return string
|
||||
strftime_utc = function(format) end,
|
||||
|
||||
---@param string string
|
||||
---@param min_width number
|
||||
---@return string
|
||||
truncate_left = function(string, min_width) end,
|
||||
|
||||
---@param string string
|
||||
---@param min_width number
|
||||
---@return string
|
||||
truncate_right = function(string, min_width) end,
|
||||
|
||||
---@param str string
|
||||
---@return string
|
||||
utf16_to_utf8 = function(str) end,
|
||||
}
|
||||
|
||||
return wezterm
|
47
.config/wezterm/types/mux.lua
Normal file
47
.config/wezterm/types/mux.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
---@meta
|
||||
|
||||
local mux = {}
|
||||
|
||||
---@return _.wezterm.MuxDomain[]
|
||||
function mux.all_domains() end
|
||||
|
||||
---@return _.wezterm.MuxWindow[]
|
||||
function mux.all_windows() end
|
||||
|
||||
---@return string
|
||||
function mux.get_active_workspace() end
|
||||
|
||||
---@param name_or_id string | number | nil
|
||||
---@return _.wezterm.MuxDomain | nil
|
||||
function mux.get_domain(name_or_id) end
|
||||
|
||||
---@param PANE_ID number
|
||||
---@return _.wezterm.Pane | nil
|
||||
function mux.get_pane(PANE_ID) end
|
||||
|
||||
---@param TAB_ID number
|
||||
---@return _.wezterm.MuxTab | nil
|
||||
function mux.get_tab(TAB_ID) end
|
||||
|
||||
---@param WINDOW_ID number
|
||||
---@return _.wezterm.MuxWindow | nil
|
||||
function mux.get_window(WINDOW_ID) end
|
||||
|
||||
---@return string[]
|
||||
function mux.get_workspace_names() end
|
||||
|
||||
---@param old string
|
||||
---@param new string
|
||||
function mux.rename_workspace(old, new) end
|
||||
|
||||
---@param WORKSPACE string
|
||||
function mux.set_active_workspace(WORKSPACE) end
|
||||
|
||||
---@param domain _.wezterm.MuxDomain
|
||||
function mux.set_default_domain(domain) end
|
||||
|
||||
---@param opts { args: string[], cwd: string, set_environment_variables: table<string, string>, domain: { DomainName: string }, workspace: string[], position: { x: number, y: number, origin?: 'ScreenCoordinateSystem' | 'MainScreen' | 'ActiveScreen' | { Named: string } } }
|
||||
---@return _.wezterm.MuxTab, _.wezterm.Pane, _.wezterm.MuxWindow
|
||||
function mux.spawn_window(opts) end
|
||||
|
||||
return mux
|
20
.config/wezterm/types/procinfo.lua
Normal file
20
.config/wezterm/types/procinfo.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
---@meta
|
||||
|
||||
local procinfo = {}
|
||||
|
||||
---@param pid number
|
||||
---@return string | nil
|
||||
function procinfo.current_working_dir_for_pid(pid) end
|
||||
|
||||
---@param pid number
|
||||
---@return string | nil
|
||||
function procinfo.executable_path_for_pid(pid) end
|
||||
|
||||
---@param pid number
|
||||
---@return _.wezterm.LocalProcessInfo | nil
|
||||
function procinfo.get_info_for_pid(pid) end
|
||||
|
||||
---@return number
|
||||
function procinfo.pid() end
|
||||
|
||||
return procinfo
|
21
.config/wezterm/types/time.lua
Normal file
21
.config/wezterm/types/time.lua
Normal file
|
@ -0,0 +1,21 @@
|
|||
---@meta
|
||||
|
||||
local time = {}
|
||||
|
||||
---@param interval_seconds number
|
||||
---@param callback fun(): any
|
||||
function time.call_after(interval_seconds, callback) end
|
||||
|
||||
---@return _.wezterm.Time
|
||||
function time.now() end
|
||||
|
||||
---@param str string
|
||||
---@param format string
|
||||
---@return _.wezterm.Time
|
||||
function time.parse(str, format) end
|
||||
|
||||
---@param str string
|
||||
---@return _.wezterm.Time
|
||||
function time.parse_rfc3339(str) end
|
||||
|
||||
return time
|
1172
.config/wezterm/types/types.lua
Normal file
1172
.config/wezterm/types/types.lua
Normal file
File diff suppressed because it is too large
Load diff
24
.config/wezterm/util/init.lua
Normal file
24
.config/wezterm/util/init.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
local M = {}
|
||||
|
||||
M.merge_tables = function(a, b)
|
||||
for k, v in pairs(b) do
|
||||
if a[v] ~= nil then
|
||||
wezterm.log_warn("Duplicate config option detected: ", { old = a[k], new = b[k]})
|
||||
end
|
||||
a[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
M.get_schemes = function()
|
||||
-- Only load color schemes once; store them for later use
|
||||
local schemes = wezterm.GLOBAL.color_schemes
|
||||
if schemes then
|
||||
return schemes
|
||||
end
|
||||
wezterm.GLOBAL.color_schemes = wezterm.get_builtin_color_schemes()
|
||||
return wezterm.GLOBAL.color_schemes
|
||||
end
|
||||
|
||||
return M
|
6
.config/wezterm/wezterm.lua
Normal file
6
.config/wezterm/wezterm.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
local config = require('config')
|
||||
|
||||
require("events.format_tab_title")
|
||||
require("events.update_status")
|
||||
|
||||
return config
|
Loading…
Add table
Add a link
Reference in a new issue