First commit
This commit is contained in:
commit
847c9e64c0
51 changed files with 4058 additions and 0 deletions
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
Loading…
Add table
Add a link
Reference in a new issue