vault backup: 2026-04-17 12:55:07

This commit is contained in:
Vadym Samoilenko 2026-04-17 12:55:07 +01:00
parent 7b494131ee
commit c4db870d90
6 changed files with 135 additions and 1 deletions

View file

@ -23,6 +23,10 @@ created: 2026-04-17
- **Local path:** `/Volumes/SSD/Projects/Oliver/Barclays-banner-builder`
## Sessions
### 2026-04-17 Create a deployment script for Ubuntu
**Asked:** Create a deployment script for Ubuntu server with Docker, database initialization, and migrations while avoiding WebSockets.
**Done:** Provided idempotent deployment script that builds Docker containers, pulls latest code, initializes database, runs migrations, and configured Apache reverse proxy with git pull + reload workflow.
### 2026-04-17 Create an idempotent deployment script for
**Asked:** Create an idempotent deployment script for Ubuntu with Docker containers, database initialization, and migrations.
**Done:** Fixed Apache ProxyPass configuration using Location blocks and FallbackResource instead of Alias/RewriteRule conflicts.
@ -143,6 +147,7 @@ created: 2026-04-17
## Change Log
| Date | Requested | Changed | Files |
|------|-----------|---------|-------|
| 2026-04-17 | Deployment automation | Docker build cache, database migrations, Apache reload script, .env production config | deploy.sh, docker-compose.yml, apache-vhost.conf |
| 2026-04-17 | Apache config fix | ProxyPass to Location blocks, FallbackResource instead of RewriteRule, Alias priority resolution | apache2.conf |
| 2026-04-17 | Deployment script & Apache config | Docker build caching, DB init/migrations, Apache ProxyPass fix with Location blocks | deploy script, apache-barclays.conf |
| 2026-04-17 | Deployment script & Apache config | Docker build with cache management, database initialization, Alembic migrations, frontend cleanup, vhost Include directive reordering | deploy.sh, /etc/apache2/sites-available/optical-dev.oliver.solutions.conf |

View file

@ -185,3 +185,9 @@ tags: [daily]
- 12:54 | `memory-compiler`
- **Asked:** Compile a new fish shell article into the knowledge base wiki structure.
- **Done:** Created fish-shell-intro.md article and updated both the dotfiles and master indexes.
- 12:54 (<1min) | `Barclays-banner-builder`
- **Asked:** Create a deployment script for Ubuntu server with Docker, database initialization, and migrations while avoiding WebSockets.
- **Done:** Provided idempotent deployment script that builds Docker containers, pulls latest code, initializes database, runs migrations, and configured Apache reverse proxy with git pull + reload workflow.
- 12:54 | `memory-compiler`
- **Asked:** Compile a new article about wezterm key bindings into the wiki knowledge base.
- **Done:** Created structured wiki article on wezterm key bindings covering modifiers, key types, leader keys, and debugging.

View file

@ -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 | 10 |
| [[wiki/dotfiles/_index\|dotfiles/]] | Linux terminal ricing: Kitty, Fish, WezTerm CLI, modern Rust CLI tools, LazyVim, unified themes, Tabby | 11 |
| [[wiki/agent-sdk/_index\|agent-sdk/]] | Claude Agent SDK (formerly Claude Code SDK) — build autonomous AI agents in Python and TypeScript | 14 |
| [[wiki/llm-models/_index\|llm-models/]] | OpenAI model catalog — GPT-5.x, o-series reasoning, audio/realtime, embeddings, moderation | 1 |

View file

@ -14,3 +14,4 @@ Linux terminal customization, shell configs, CLI tool setups, and ricing guides.
| [[wiki/dotfiles/wezterm-font-shaping\|wezterm-font-shaping]] | HarfBuzz font shaping, disabling ligatures, per-font harfbuzz_features, stylistic sets | wezterm.org/config/font-shaping.html | 2026-04-17 |
| [[wiki/dotfiles/wezterm-fonts\|wezterm-fonts]] | Font selection, fallback chains, bundled fonts, key config options, ls-fonts debug CLI | wezterm.org/config/fonts.html | 2026-04-17 |
| [[wiki/dotfiles/fish-shell-intro\|fish-shell-intro]] | Fish shell intro: features, setup, default shell, config files, PATH, shebang, exit handlers | fishshell.com/docs/current/index.html | 2026-04-17 |
| [[wiki/dotfiles/wezterm-key-bindings\|wezterm-key-bindings]] | Key binding config: modifiers, phys/mapped/raw prefixes, Leader key, CapsLock-as-leader, debug | wezterm.org/config/keys.html | 2026-04-17 |

View file

@ -0,0 +1,122 @@
---
title: "WezTerm Key Bindings"
aliases: [wezterm-keys, wezterm-keybindings-config, wezterm-leader-key]
tags: [wezterm, terminal, keybindings, lua, config]
sources: [raw/Key Binding - Wez's Terminal Emulator.md]
created: 2026-04-17
updated: 2026-04-17
---
## Overview
WezTerm key bindings are configured in `~/.wezterm.lua` via `config.keys`. You can override defaults, disable them, or add entirely new assignments.
## Modifier Keys
| Label | Equivalent | Platform notes |
|-------|-----------|----------------|
| `SUPER`, `CMD`, `WIN` | same key | macOS=Command, Windows=Win, Linux=Super/Hyper |
| `CTRL` | — | Left/right equivalent |
| `SHIFT` | — | Left/right equivalent |
| `ALT`, `OPT`, `META` | same key | macOS=Option, others=Alt/Meta |
| `LEADER` | modal state | WezTerm-managed, see [Leader Key](#leader-key) |
| `VoidSymbol` | remapped key | X11 only — e.g. CapsLock remapped via `setxkbmap` |
Combine modifiers with `|`: `"CMD|CTRL"`, `"LEADER|SHIFT"`.
## Key Value Types
- **Literal character**`key = 'a'` (single unicode character)
- **Named keycode**`key = 'F1'`, `key = 'Enter'`, `key = 'LeftArrow'`, etc.
- **`phys:` prefix** — physical position on ANSI US keyboard: `key = "phys:A"`
- **`mapped:` prefix** — post-layout OS value: `key = "mapped:a"`
- **`raw:` prefix** — OS/hardware keycode integer: `key = "raw:123"`
Default (no prefix) behavior is controlled by `key_map_preference`:
- `"Mapped"` (default since 20220408) — assumes `mapped:`
- `"Physical"` — assumes `phys:`
> **Upgrade note:** If you had `{key="N", mods="CMD"}` before v20220319, change to `{key="N", mods="CMD|SHIFT"}` or `{key="mapped:N", mods="CMD"}`.
## Basic Config Example
```lua
config.keys = {
-- Disable a default binding
{
key = 'm',
mods = 'CMD',
action = wezterm.action.DisableDefaultAssignment,
},
}
```
## Leader Key
A **leader** is a modal modifier — press the leader combo, then a follow-up key.
- While active, only `LEADER`-prefixed bindings fire; all other keypresses are swallowed
- Auto-cancels after `timeout_milliseconds` (default: 1000ms)
```lua
config.leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1000 }
config.keys = {
-- CTRL-A then | → split horizontal
{
key = '|',
mods = 'LEADER|SHIFT',
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
-- CTRL-A then CTRL-A → pass through CTRL-A to terminal
{
key = 'a',
mods = 'LEADER|CTRL',
action = wezterm.action.SendKey { key = 'a', mods = 'CTRL' },
},
}
```
### CapsLock as Leader (X11)
```bash
setxkbmap -option caps:none # remap CapsLock → VoidSymbol
```
```lua
config.leader = { key = 'VoidSymbol', mods = '', timeout_milliseconds = 1000 }
config.keys = {
{ key = '|', mods = 'LEADER|SHIFT', action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } },
{ key = '-', mods = 'LEADER', action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } },
}
```
## Discovering Raw Key Codes
Set in config to log key events:
```lua
config.debug_key_events = true
```
Then press the key to find its `raw:NNN` value.
## Key Takeaways
- `config.keys` is a list of `{key, mods, action}` tables — override or extend defaults
- Modifiers `SUPER`/`CMD`/`WIN` and `ALT`/`OPT`/`META` are platform aliases
- Use `phys:` for layout-independent bindings, `mapped:` for post-layout, `raw:` for hardware codes
- `LEADER` enables vim-style two-key combos; anything not matched is swallowed during leader mode
- `key_map_preference = "Mapped"` is the modern default (since v20220408)
- Use `DisableDefaultAssignment` to cleanly remove built-in bindings
## Related
- [[wiki/dotfiles/wezterm-default-keybindings|Default Key Assignments Table]]
- [[wiki/dotfiles/wezterm-config|WezTerm Config Structure]]
- [[wiki/dotfiles/wezterm-cli-reference|WezTerm CLI Reference]]
- [[wiki/dotfiles/terminal-cheatsheet|Terminal Cheatsheet]]
## Sources
- [WezTerm Key Binding Docs](https://wezterm.org/config/keys.html)
- Raw article: `raw/Key Binding - Wez's Terminal Emulator.md`