vault backup: 2026-04-17 13:04:50
This commit is contained in:
parent
0a6d02dfc5
commit
35ddeebeaf
5 changed files with 125 additions and 1 deletions
|
|
@ -236,3 +236,6 @@ tags: [daily]
|
|||
- 13:03 | `Barclays-banner-builder`
|
||||
- **Asked:** Create an idempotent deployment script for Docker containers on Ubuntu with Apache reverse proxy, database initialization, and migrations.
|
||||
- **Done:** Provided deployment script structure with git pull, Docker build caching, database initialization, and Alembic migrations for server deployment.
|
||||
- 13:04 (<1min) | `memory-compiler`
|
||||
- **Asked:** Compile a new article on wezterm pane detection methods into the wiki knowledge base and update indices.
|
||||
- **Done:** Created structured wiki article comparing 4 detection methods, updated dotfiles index to 17 articles, and bumped master index count.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ This 3-hop pattern works for hundreds of articles without vector search.
|
|||
| [[wiki/qa/_index\|qa/]] | Filed answers to queries (saved with `--file-back`) | 0 |
|
||||
| [[wiki/homelab/_index\|homelab/]] | Self-hosted infra: Proxmox install, IOMMU/PCI passthrough, hypervisor setup, budget builds | 2 |
|
||||
| [[wiki/web-agency/_index\|web-agency/]] | AI-assisted website building & selling: Claude Code, Nanobanana 2, Kling, LaunchPath MCP | 1 |
|
||||
| [[wiki/dotfiles/_index\|dotfiles/]] | Linux terminal ricing: Kitty, Fish, WezTerm CLI, modern Rust CLI tools, LazyVim, unified themes, Tabby | 16 |
|
||||
| [[wiki/dotfiles/_index\|dotfiles/]] | Linux terminal ricing: Kitty, Fish, WezTerm CLI, modern Rust CLI tools, LazyVim, unified themes, Tabby | 17 |
|
||||
|
||||
| [[wiki/agent-sdk/_index\|agent-sdk/]] | Claude Agent SDK (formerly Claude Code SDK) — build autonomous AI agents in Python and TypeScript | 17 |
|
||||
| [[wiki/llm-models/_index\|llm-models/]] | OpenAI model catalog — GPT-5.x, o-series reasoning, audio/realtime, embeddings, moderation | 1 |
|
||||
|
|
|
|||
|
|
@ -20,3 +20,5 @@ Linux terminal customization, shell configs, CLI tool setups, and ricing guides.
|
|||
| [[wiki/dotfiles/wezterm-keyboard-encoding\|wezterm-keyboard-encoding]] | xterm, modifyOtherKeys, CSI-u, Kitty protocol, Win32 Input Mode — priority order and config options | wezterm.org/config/key-encoding.html | 2026-04-17 |
|
||||
| [[wiki/dotfiles/wezterm-launching-programs\|wezterm-launching-programs]] | Shell resolution, default_prog, one-off CLI launch, CWD inheritance, env vars, Launcher Menu | wezterm.org/config/launch.html | 2026-04-17 |
|
||||
| [[wiki/dotfiles/wezterm-mouse-bindings\|wezterm-mouse-bindings]] | Mouse binding config: default assignments, custom bindings, wheel events, Up/Down event gotcha | wezterm.org/config/mouse.html | 2026-04-17 |
|
||||
| [[wiki/dotfiles/wezterm-pane-to-lua\|wezterm-pane-to-lua]] | Passing data from pane to Lua: User Vars (OSC 1337), OSC 7 CWD, title OSC, local process APIs | wezterm.org/recipes/passing-data.html | 2026-04-17 |
|
||||
| [[wiki/dotfiles/wezterm-plugins\|wezterm-plugins]] | Plugin system: install via HTTPS/file URL, update_all(), remove, develop, fork existing plugins | wezterm.org/config/plugins.html | 2026-04-17 |
|
||||
|
|
|
|||
119
wiki/dotfiles/wezterm-plugins.md
Normal file
119
wiki/dotfiles/wezterm-plugins.md
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
---
|
||||
title: "WezTerm Plugins"
|
||||
aliases: [wezterm-plugin-system, wezterm-lua-plugins]
|
||||
tags: [wezterm, plugins, lua, terminal, dotfiles]
|
||||
sources: [raw/Plugins - Wez's Terminal Emulator.md]
|
||||
created: 2026-04-17
|
||||
updated: 2026-04-17
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
WezTerm plugins are Lua packages that extend the terminal with functionality not included in the core product. They are distributed and installed via Git URLs (HTTPS or `file://` protocol).
|
||||
|
||||
A curated list of plugins is maintained at [awesome-wezterm](https://github.com/michaelbrusegard/awesome-wezterm).
|
||||
|
||||
## Installing a Plugin
|
||||
|
||||
```lua
|
||||
local wezterm = require 'wezterm'
|
||||
local a_plugin = wezterm.plugin.require 'https://github.com/owner/repo'
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
a_plugin.apply_to_config(config)
|
||||
|
||||
return config
|
||||
```
|
||||
|
||||
- URL must use `https://` or `file://` protocol
|
||||
- On first `require`, WezTerm clones the repo into its runtime directory (`plugins/NAME`)
|
||||
- Default branch (`main`) is checked out
|
||||
|
||||
### With Plugin Configuration
|
||||
|
||||
```lua
|
||||
local myPluginConfig = { enable = true, location = 'right' }
|
||||
a_plugin.apply_to_config(config, myPluginConfig)
|
||||
```
|
||||
|
||||
Consult each plugin's README for available options.
|
||||
|
||||
## Updating Plugins
|
||||
|
||||
Plugins are **not** auto-updated when the upstream repo changes.
|
||||
|
||||
- Run `wezterm.plugin.update_all()` to pull all plugin updates
|
||||
- Can be called from the Lua REPL in the [[wiki/dotfiles/wezterm-cli-reference|Debug Overlay]]
|
||||
|
||||
## Removing a Plugin
|
||||
|
||||
1. Find the plugin directory with `wezterm.plugin.list()` — returns an array with `plugin_dir` and `url` fields
|
||||
2. Delete the directory at `plugins/NAME` inside the WezTerm runtime directory
|
||||
|
||||
## Developing a Plugin
|
||||
|
||||
### Minimal Structure
|
||||
|
||||
```
|
||||
myPlugin/
|
||||
└── plugin/
|
||||
└── init.lua ← must export apply_to_config(config, ...)
|
||||
```
|
||||
|
||||
`init.lua` must return a module with at least `apply_to_config(config)`.
|
||||
|
||||
### Local Development Workflow
|
||||
|
||||
```lua
|
||||
local a_plugin = wezterm.plugin.require "file:///home/user/projects/myPlugin"
|
||||
```
|
||||
|
||||
After any code change, run `wezterm.plugin.update_all()` to sync into the runtime directory.
|
||||
|
||||
### Multi-Module Plugins
|
||||
|
||||
When a plugin spans multiple Lua files, update `package.path` to point at the plugin directory:
|
||||
|
||||
```lua
|
||||
function findPluginPackagePath(myProject)
|
||||
local sep = package.config:sub(1, 1) == '\\' and '\\' or '/'
|
||||
for _, v in ipairs(wezterm.plugin.list()) do
|
||||
if v.url == myProject then
|
||||
return v.plugin_dir .. sep .. 'plugin' .. sep .. '?.lua'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
package.path = package.path .. ';' .. findPluginPackagePath 'file:///path/to/myPlugin'
|
||||
```
|
||||
|
||||
## Forking and Modifying an Existing Plugin
|
||||
|
||||
1. Remove original plugin from WezTerm (delete its `plugin_dir`)
|
||||
2. Fork and clone the repo locally
|
||||
3. Optionally add `upstream` remote to track original changes
|
||||
4. Create a feature branch, then make it the default: `git symbolic-ref HEAD refs/heads/mybranch`
|
||||
5. Fix any hard-coded `plugin_dir` references in the plugin source
|
||||
6. Load via `file://` URL and use the standard dev workflow
|
||||
|
||||
## Key Takeaways
|
||||
|
||||
- Plugins install via `wezterm.plugin.require 'https://...'` — clones into the runtime directory
|
||||
- Pass a Lua table as second arg to `apply_to_config` for plugin-specific options
|
||||
- Updates are **manual** — run `wezterm.plugin.update_all()` explicitly
|
||||
- Removal = delete the folder reported by `wezterm.plugin.list()`
|
||||
- Local `file://` URLs enable plugin development without publishing to GitHub
|
||||
- Multi-module plugins need `package.path` patched to find sibling `.lua` files
|
||||
- To fork a plugin: remove → clone → make your branch the repo default → load via `file://`
|
||||
|
||||
## Related Articles
|
||||
|
||||
- [[wiki/dotfiles/wezterm-config|WezTerm Config]] — Lua config structure and file locations
|
||||
- [[wiki/dotfiles/wezterm-cli-reference|WezTerm CLI Reference]] — CLI subcommands including Debug Overlay
|
||||
- [[wiki/dotfiles/wezterm-key-bindings|WezTerm Key Bindings]] — keybinding config where plugins often hook in
|
||||
- [[wiki/dotfiles/wezterm-pane-to-lua|Pane to Lua]] — passing data to Lua, useful in plugin development
|
||||
|
||||
## Sources
|
||||
|
||||
- [WezTerm Plugins Docs](https://wezterm.org/config/plugins.html)
|
||||
- Raw file: `raw/Plugins - Wez's Terminal Emulator.md`
|
||||
Loading…
Add table
Reference in a new issue