|
6 | 6 | ---@module "types.objects" |
7 | 7 | ---@module "types.wezterm" |
8 | 8 |
|
9 | | --- Alias to help identify types that should actually be any |
10 | | ----@alias ANY any |
11 | | - |
12 | 9 | ---@alias FormatItem.UnderlineStyle |
13 | 10 | ---|"None" |
14 | 11 | ---|"Single" |
|
25 | 22 | ---@alias FormatItemAttribute |
26 | 23 | ---|{ Underline: FormatItem.UnderlineStyle } |
27 | 24 | ---|{ Intensity: FormatItem.Intensity } |
28 | | ----|{ Italic: bool } |
29 | | - |
30 | | --- Reset all attributes to default |
31 | | ----@alias FormatItemReset "ResetAttributes" |
| 25 | +---|{ Italic: boolean } |
32 | 26 |
|
33 | 27 | ---@alias FormatItem |
34 | | ----|FormatItemReset |
| 28 | +---|"ResetAttributes" |
35 | 29 | ---|{ Attribute: FormatItemAttribute } |
36 | 30 | ---|{ Foreground: ColorSpec } |
37 | 31 | ---|{ Background: ColorSpec } |
|
66 | 60 | ---|"LowPower" |
67 | 61 | ---|"HighPerformance" |
68 | 62 |
|
69 | | --- Only Option |
70 | | ----@alias FontRasterizerSelection "FreeType" |
71 | | - |
72 | 63 | ---@alias FontShaperSelection |
73 | 64 | ---|"Allsorts" very preliminary support |
74 | 65 | ---|"Harfbuzz" default |
|
95 | 86 | ---|"Full" |
96 | 87 | ---|"Unknown" |
97 | 88 |
|
98 | | --- 32-bit floating point number |
99 | | ----@alias f32 number |
100 | | --- 64-bit floating point number |
101 | | ----@alias f64 number |
102 | | - |
103 | | --- 8-bit unsigned integer |
104 | | ----@alias u8 integer |
105 | | --- 16-bit unsigned integer |
106 | | ----@alias u16 integer |
107 | | --- 32-bit unsigned integer |
108 | | ----@alias u32 integer |
109 | | --- 64-bit unsigned integer |
110 | | ----@alias u64 integer |
111 | | - |
112 | | --- 64-bit signed integer |
113 | | ----@alias i64 integer |
114 | | - |
115 | | ----@alias Duration u64 |
116 | | - |
117 | | ----@alias usize number |
118 | | - |
119 | | ----@alias Regex string |
120 | | - |
121 | | ----@alias RgbColor string |
122 | | --- |
123 | | ----@alias RgbaColor string |
124 | | - |
125 | | ----@alias bool boolean |
126 | | - |
127 | 89 | ---@alias BoldBrightening |
128 | 90 | ---|"No" |
129 | 91 | ---|"BrightAndBold" |
130 | 92 | ---|"BrightOnly" |
131 | 93 |
|
132 | | --- TODO: describe |
133 | 94 | ---@alias ExitBehavior |
134 | 95 | ---|"Close" |
135 | 96 | ---|"CloseOnCleanExit" |
136 | 97 | ---|"Hold" |
137 | 98 |
|
138 | | --- TODO: describe |
139 | 99 | ---@alias ExitBehaviorMessaging |
140 | 100 | ---|"Verbose" |
141 | 101 | ---|"Brief" |
|
205 | 165 | ---|string |
206 | 166 | -- Add other valid combinations if needed |
207 | 167 |
|
208 | | --- A value expressed in points, where 72 points == 1 inch |
209 | | ----@alias Points string |
210 | | - |
211 | | --- A value expressed in raw pixels |
212 | | ----@alias Pixels string|number |
213 | | - |
214 | | --- A value expressed in terms of a fraction of the maximum |
215 | | --- value in the same direction. |
216 | | --- For example, left padding of 10% depends on |
217 | | --- the pixel width of that element. |
218 | | --- The value is 1.0 == 100%. |
219 | | --- It is possible to express e.g. 2.0 for 200% |
220 | | ----@alias Percent string |
221 | | - |
222 | | --- A value expressed in terms of a fraction of the cell |
223 | | --- size computed from the configured font size. |
224 | | --- 1.0 == the cell size |
225 | | ----@alias Cells string |
226 | | - |
227 | | ----@alias Dimension |
228 | | ----|Points |
229 | | ----|Pixels |
230 | | ----|Percent |
231 | | ----|Cells |
232 | | - |
233 | 168 | ---@alias TabBarIntensity |
234 | 169 | ---|"Normal" |
235 | 170 | ---|"Half" |
|
296 | 231 | -- Specify whether you want the text to be italic for this tab. |
297 | 232 | -- |
298 | 233 | -- The default is `false` |
299 | | ----@field italic? bool |
| 234 | +---@field italic? boolean |
300 | 235 | -- Specify whether you want the text to be rendered with strikethrough (true) |
301 | 236 | -- or not for this tab. |
302 | 237 | -- |
303 | 238 | -- The default is `false` |
304 | | ----@field strikethrough? bool |
| 239 | +---@field strikethrough? boolean |
305 | 240 |
|
306 | 241 | ---@class TabBarColors |
307 | 242 | -- The text color to use when the attributes are reset to default |
|
327 | 262 | -- moves over the new tab button |
328 | 263 | ---@field new_tab_hover TabBarColor |
329 | 264 |
|
330 | | ----@alias AC "AnsiColor" |
331 | | - |
332 | | ----@alias CO "Color" |
333 | | - |
334 | | ----@alias ColorSpec table<AC, AnsiColor>|table<CO, string> |
| 265 | +---@alias ColorSpec table<"AnsiColor", AnsiColor>|table<"Color", string> |
335 | 266 |
|
336 | 267 | ---@class Palette |
337 | 268 | -- The text color to use when the attributes are reset to default |
|
529 | 460 | ---@field stretch? FontStretch |
530 | 461 | -- Whether the font should be an italic variant |
531 | 462 | ---@field style? FontStyle |
532 | | ----@field is_fallback? bool |
533 | | ----@field is_synthetic? bool |
| 463 | +---@field is_fallback? boolean |
| 464 | +---@field is_synthetic? boolean |
534 | 465 | ---@field scale? number |
535 | 466 |
|
536 | 467 | -- `FontAttributes`-like class but with font family specified |
|
544 | 475 | -- you can combine the flags like `"NO_HINTING|MONOCHROME"` |
545 | 476 | -- **(you probably wouldn't want to do this)** |
546 | 477 | ---@field freetype_load_flags? FreeTypeLoadFlags |
547 | | ----@field assume_emoji_presentation? bool |
| 478 | +---@field assume_emoji_presentation? boolean |
548 | 479 |
|
549 | 480 | ---@class Fonts |
550 | 481 | ---@field fonts FontAttributes[] |
551 | 482 |
|
552 | 483 | ---@class WindowFrameConfig |
553 | | ----@field inactive_titlebar_bg? RgbColor |
554 | | ----@field active_titlebar_bg? RgbColor |
555 | | ----@field inactive_titlebar_fg? RgbColor |
556 | | ----@field active_titlebar_fg? RgbColor |
557 | | ----@field inactive_titlebar_border_bottom? RgbColor |
558 | | ----@field active_titlebar_border_bottom? RgbColor |
559 | | ----@field button_fg? RgbColor |
560 | | ----@field button_bg? RgbColor |
561 | | ----@field button_hover_fg? RgbColor |
562 | | ----@field button_hover_bg? RgbColor |
563 | | ----@field border_left_width? Dimension |
564 | | ----@field border_right_width? Dimension |
565 | | ----@field border_top_height? Dimension |
566 | | ----@field border_bottom_height? Dimension |
567 | | ----@field border_left_color? RgbaColor |
568 | | ----@field border_right_color? RgbaColor |
569 | | ----@field border_top_color? RgbaColor |
570 | | ----@field border_bottom_color? RgbaColor |
| 484 | +---@field inactive_titlebar_bg? string |
| 485 | +---@field active_titlebar_bg? string |
| 486 | +---@field inactive_titlebar_fg? string |
| 487 | +---@field active_titlebar_fg? string |
| 488 | +---@field inactive_titlebar_border_bottom? string |
| 489 | +---@field active_titlebar_border_bottom? string |
| 490 | +---@field button_fg? string |
| 491 | +---@field button_bg? string |
| 492 | +---@field button_hover_fg? string |
| 493 | +---@field button_hover_bg? string |
| 494 | +---@field border_left_width? string|number |
| 495 | +---@field border_right_width? string|number |
| 496 | +---@field border_top_height? string|number |
| 497 | +---@field border_bottom_height? string|number |
| 498 | +---@field border_left_color? string |
| 499 | +---@field border_right_color? string |
| 500 | +---@field border_top_color? string |
| 501 | +---@field border_bottom_color? string |
571 | 502 |
|
572 | 503 | ---@class TabBarStyle |
573 | 504 | ---@field new_tab? string |
|
580 | 511 | ---@field window_close_hover? string |
581 | 512 |
|
582 | 513 | ---@class HyperlinkRule |
583 | | ----@field regex? Regex |
| 514 | +---@field regex? string |
584 | 515 | ---@field format? string |
585 | | ----@field highlight? usize |
| 516 | +---@field highlight? number |
586 | 517 |
|
587 | 518 | ---@class SerialDomain |
588 | 519 | -- The name of this specific domain. |
|
597 | 528 | -- Set the baud rate. |
598 | 529 | -- |
599 | 530 | -- The default is `9600` baud |
600 | | ----@field baud usize|9600 |
| 531 | +---@field baud number|9600 |
601 | 532 |
|
602 | 533 | ---@class GpuInfo |
603 | 534 | ---@field name string |
604 | 535 | ---@field device_type string |
605 | 536 | ---@field backend string |
606 | 537 | ---@field driver string |
607 | 538 | ---@field driver_info string |
608 | | ----@field vendor u32 |
609 | | ----@field device u32 |
| 539 | +---@field vendor integer |
| 540 | +---@field device integer |
610 | 541 |
|
611 | 542 | ---@class UnixDomain |
612 | 543 | -- The name of this specific domain. |
613 | 544 | -- Must be unique amongst all types of domain in the configuration file |
614 | 545 | ---@field name string |
615 | 546 | -- The path to the socket. |
616 | 547 | -- If unspecified, a resonable default value will be computed |
617 | | ----@field socket_path PathBuf |
| 548 | +---@field socket_path string |
618 | 549 | -- If `true`, connect to this domain automatically at startup |
619 | | ----@field connect_automatically bool |
| 550 | +---@field connect_automatically boolean |
620 | 551 | -- If `true`, do not attempt to start this server if we try and fail to |
621 | 552 | -- connect to it. |
622 | | ----@field no_serve_automatically bool |
| 553 | +---@field no_serve_automatically boolean |
623 | 554 | -- If we decide that we need to start the server, the command to run |
624 | 555 | -- to set that up. |
625 | 556 | -- |
|
644 | 575 | -- This is not recommended on a multi-user system, |
645 | 576 | -- but is useful, for example, when running the server inside a WSL container |
646 | 577 | -- but with the socket on the host NTFS volume |
647 | | ----@field skip_permissions_check bool |
648 | | ----@field read_timeout Duration |
| 578 | +---@field skip_permissions_check boolean |
| 579 | +---@field read_timeout integer |
649 | 580 | -- Don"t use `default_local_echo_threshold_ms()` here to disable |
650 | 581 | -- the predictive echo for UNIX domains by default |
651 | | ----@field write_timeout Duration |
| 582 | +---@field write_timeout integer |
652 | 583 | -- Show time since last response when waiting for a response. |
653 | 584 | -- |
654 | 585 | -- Recommended to look at this: |
655 | 586 | -- `https://wezfurlong.org/wezterm/config/lua/pane/get_metadata.html#since_last_response_ms` |
656 | | ----@field local_echo_threshold_ms u64 |
657 | | ----@field overlay_lag_indicator bool |
| 587 | +---@field local_echo_threshold_ms integer |
| 588 | +---@field overlay_lag_indicator boolean |
658 | 589 |
|
659 | 590 | ---@class LeaderKey: KeyNoAction |
660 | | ----@field timeout_milliseconds? u64 |
| 591 | +---@field timeout_milliseconds? integer |
661 | 592 |
|
662 | 593 | ---@class HyperLinkRule |
663 | 594 | -- The regular expression to match |
|
761 | 692 | -- Only the first `"format-tab-title"` event will be executed; |
762 | 693 | -- it doesn't make sense to define multiple instances of the event |
763 | 694 | -- with `multiple wezterm.on("format-tab-title", ...)` calls |
764 | | ----@alias Event.FormatTabTitle fun(event: FormatTabTitle, callback: fun(tab: MuxTab, tabs: MuxTab[], panes: Pane[], config: Config, hover: bool, max_width: number): string|FormatItem) |
| 695 | +---@alias Event.FormatTabTitle fun(event: FormatTabTitle, callback: fun(tab: MuxTab, tabs: MuxTab[], panes: Pane[], config: Config, hover: boolean, max_width: number): string|FormatItem) |
765 | 696 |
|
766 | 697 | -- The parameters to the event are: |
767 | 698 | -- |
|
1094 | 1025 | ---@class MouseBindingBase |
1095 | 1026 | ---@field event MouseEvent |
1096 | 1027 | ---@field action Action |
1097 | | ----@field mouse_reporting? bool |
1098 | | ----@field alt_screen? bool|"Any" |
| 1028 | +---@field mouse_reporting? boolean |
| 1029 | +---@field alt_screen? boolean|"Any" |
1099 | 1030 |
|
1100 | 1031 | ---@class MouseBinding: MouseBindingBase |
1101 | 1032 | ---@field mods string |
0 commit comments