Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ This project also features type annotations for various WezTerm plugins.
| [wezterm-sync](https://github.com/dfsramos/wezterm-sync) | [Documentation](docs/sync.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.sync.txt) |
| [wezterm-tabs](https://github.com/yriveiro/wezterm-tabs) | [Documentation](docs/wezterm-tabs.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.wezterm-tabs.txt) |
| [wezterm-theme-rotator](https://github.com/koh-sh/wezterm-theme-rotator) | [Documentation](docs/wezterm-theme-rotator.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.wezterm-theme-rotator.txt) |
| [widgets.wez](https://github.com/usrivastava92/widgets.wez) | [Documentation](docs/widgets.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.widgets.txt) |
| [workspace-picker.wezterm](https://github.com/isseii10/workspace-picker.wezterm) | [Documentation](docs/workspace-picker.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.workspace-picker.txt) |
| [workspacesionizer.wezterm](https://github.com/vieitesss/workspacesionizer.wezterm) | [Documentation](docs/workspacesionizer.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.workspacesionizer.txt) |
| [wsinit.wezterm](https://github.com/JuanraCM/wsinit.wezterm) | [Documentation](docs/wsinit.md) | [Neovim Helpdoc](doc/wezterm-types-plugin.wsinit.txt) |
Expand Down
Empty file.
4 changes: 3 additions & 1 deletion doc/wezterm-types.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*wezterm-types.txt* For NVIM >=v0.7.0 Last change: 2026 June 09
*wezterm-types.txt* For NVIM >=v0.7.0 Last change: 2026 June 23

==============================================================================
1. wezterm-types *wezterm-types-wezterm-types*
Expand Down Expand Up @@ -169,6 +169,8 @@ This project also features type annotations for various WezTerm plugins.

wezterm-theme-rotator Documentation Neovim Helpdoc

widgets.wez Documentation Neovim Helpdoc

workspace-picker.wezterm Documentation Neovim Helpdoc

workspacesionizer.wezterm Documentation Neovim Helpdoc
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ We will keep adding more community plugins as we find them.
- [wezterm-sync](./sync.md)
- [wezterm-tabs](./wezterm-tabs.md)
- [wezterm-theme-rotator](./wezterm-theme-rotator.md)
- [widgets.wez](./widgets.md)
- [workspace-picker.wezterm](./workspace-picker.md)
- [workspacesionizer.wezterm](./workspacesionizer.md)
- [wsinit.wezterm](./wsinit.md)
Expand Down
11 changes: 11 additions & 0 deletions docs/widgets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### `widgets.wez`

You can import type annotations for
[`usrivastava92/widgets.wez`](https://github.com/usrivastava92/widgets.wez) as shown below:

```lua
---@type Widgets
local sys = wezterm.plugin.require("https://github.com/usrivastava92/widgets.wez")
```

<!-- vim: set ts=2 sts=2 sw=2 et ai si sta: -->
110 changes: 110 additions & 0 deletions lua/wezterm/types/plugins/widgets.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---@meta
---@diagnostic disable:unused-local

---@class Widgets.WidgetOpts
---@field color? string
---@field icon? string|false
---@field throttle? integer

---@class WidgetsOpts
---@field left? Widgets.Widget[]
---@field right? Widgets.Widget[]
---@field separator? { text?: string, color?: string }

---@class Widgets.Battery
---@field charge Widgets.Battery.Charge

---@class Widgets.CPU
---@field utilization Widgets.CPU.Utilization

---@class Widgets.Disk
---@field read Widgets.Disk.Read
---@field space Widgets.Disk.Space
---@field write Widgets.Disk.Write

---@class Widgets.Network
---@field download Widgets.Network.Download
---@field upload Widgets.Network.Upload

---@class Widgets.RAM
---@field utilization Widgets.RAM.Utilization

---@class Widgets.CPU.Utilization
local U = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function U.widget(opts) end

---@class Widgets.Battery.Charge
local C = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function C.widget(opts) end

---@class Widgets.Disk.Read
local R = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function R.widget(opts) end

---@class Widgets.Disk.Space
local S = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function S.widget(opts) end

---@class Widgets.Disk.Write
local Write = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function Write.widget(opts) end

---@class Widgets.Network.Download
local D = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function D.widget(opts) end

---@class Widgets.RAM.Utilization
local RU = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function RU.widget(opts) end

---@class Widgets.Network.Upload
local Upload = {}

---@param opts? WidgetsOpts
---@return Widgets.Widget widget
function Upload.widget(opts) end

---@class Widgets.Widget
---@field opts Widgets.WidgetOpts
local W = {}

---@return string formatted
function W.get_text() end

---@return { [1]: { Foreground: string }, [2]: { Text: string } }
function W.get_formatted() end

---@class Widgets
---@field battery Widgets.Battery
---@field cpu Widgets.CPU
---@field disk Widgets.Disk
---@field network Widgets.Network
---@field ram Widgets.RAM
local M = {}

---@param config Config
---@param opts WidgetsOpts
function M.apply_to_config(config, opts) end

-- vim: set ts=2 sts=2 sw=2 et ai si sta: