vault backup: 2026-04-17 12:58:17

This commit is contained in:
Vadym Samoilenko 2026-04-17 12:58:17 +01:00
parent ddffbd4e84
commit 64e4b78afa
6 changed files with 175 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 an idempotent deployment script for
**Asked:** Create an idempotent deployment script for Docker app on Ubuntu with Apache reverse proxy.
**Done:** Identified Apache configuration issue (sites-enabled vs sites-available) and updated deploy script to patch correct file.
### 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.
@ -147,6 +151,7 @@ created: 2026-04-17
## Change Log
| Date | Requested | Changed | Files |
|------|-----------|---------|-------|
| 2026-04-17 | Deployment script & Apache config | Fixed sites-enabled patching, updated deploy.sh for correct config file | deploy.sh, apache-config-patch |
| 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 |

View file

@ -200,3 +200,9 @@ tags: [daily]
- 12:57 (<1min) | `memory-compiler`
- **Asked:** Compile a new article about WezTerm keyboard encoding into the wiki knowledge base.
- **Done:** Filed structured article covering 4 encoding schemes with priority order table under wiki/dotfiles topic.
- 12:57 (<1min) | `Barclays-banner-builder`
- **Asked:** Create an idempotent deployment script for Docker app on Ubuntu with Apache reverse proxy.
- **Done:** Identified Apache configuration issue (sites-enabled vs sites-available) and updated deploy script to patch correct file.
- 12:57 | `memory-compiler`
- **Asked:** Update the wiki knowledge base by compiling a new raw article into structured format with master index.
- **Done:** Updated master index and topic _index.md files to include new article in organized wiki structure.

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 | 14 |
| [[wiki/dotfiles/_index\|dotfiles/]] | Linux terminal ricing: Kitty, Fish, WezTerm CLI, modern Rust CLI tools, LazyVim, unified themes, Tabby | 15 |
| [[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

@ -18,3 +18,4 @@ Linux terminal customization, shell configs, CLI tool setups, and ricing guides.
| [[wiki/dotfiles/wezterm-key-tables\|wezterm-key-tables]] | Modal keybinding layers via key_tables: ActivateKeyTable, activation stack, one_shot, timeout | wezterm.org/config/key-tables.html | 2026-04-17 |
| [[wiki/dotfiles/wezterm-keyboard-concepts\|wezterm-keyboard-concepts]] | OS input concepts (IME, dead keys, AltGr, physical vs mapped keys) and how WezTerm processes them | wezterm.org/config/keyboard-concepts.html | 2026-04-17 |
| [[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 |

View file

@ -0,0 +1,162 @@
---
title: "WezTerm — Launching Programs"
aliases: [wezterm-launch, wezterm-default-prog, wezterm-launcher-menu]
tags: [wezterm, terminal, shell, launch, config]
sources: [raw/Launching Programs - Wez's Terminal Emulator.md]
created: 2026-04-17
updated: 2026-04-17
---
## Overview
WezTerm resolves which program to spawn for new tabs/windows using a clear priority chain. You can override the default at config level, per-invocation via CLI, or interactively via the Launcher Menu.
---
## Shell Resolution Order
WezTerm deliberately **ignores `$SHELL`** and reads the password database instead, so a shell change takes effect without restarting WezTerm.
- **Unix:** password database entry for the current user → spawned as `-<SHELL>` (login shell)
- **Windows (fallback):** `%COMSPEC%``cmd.exe`
WezTerm then sets `$SHELL` itself. To override the value downstream, use `set_environment_variables`:
```lua
config.set_environment_variables = {
SHELL = "/opt/homebrew/bin/fish",
}
```
---
## Changing the Default Program
```lua
-- Spawn fish in login mode for every new tab/window
config.default_prog = { '/usr/local/bin/fish', '-l' }
```
---
## One-Off Programs via CLI
```sh
# Open a new WezTerm window running vim
wezterm start -- vim ~/.wezterm.lua
# Start in a specific directory
wezterm start --cwd /some/path
```
---
## Working Directory (CWD) Resolution
Priority order for new panes/tabs:
1. **OSC 7** escape sequence reported by the shell (most reliable — requires shell integration)
2. CWD of current process group leader (local panes only)
3. `default_cwd` config value
4. User home directory
```lua
config.default_cwd = "/some/path"
```
For [[wiki/dotfiles/wezterm-cli-reference|SpawnCommand]] objects (key bindings, launcher menu):
```lua
{
label = "List files in /some/path",
args = { "ls", "-al" },
cwd = "/some/path",
}
```
---
## Environment Variables
`set_environment_variables` inherits WezTerm's own env then overlays your values:
```lua
config.set_environment_variables = {
-- OSC 7 prompt for cmd.exe (Windows)
prompt = '$E]7;file://localhost/$P$E\\$E[32m$T$E[0m $E[35m$P$E[36m$_$G$E[0m ',
}
```
---
## Launcher Menu
Accessed by **right-clicking** the `+` button in the tab bar, or via a key binding mapped to `ShowLauncher` / `ShowLauncherArgs`.
Each entry is a `SpawnCommand` object:
```lua
config.launch_menu = {
{ args = { 'top' } },
{
label = 'Bash',
args = { 'bash', '-l' },
-- cwd = "/some/path",
-- set_environment_variables = { FOO = "bar" },
},
}
```
### Dynamic Windows Entries Example
```lua
local wezterm = require 'wezterm'
local launch_menu = {}
if wezterm.target_triple == 'x86_64-pc-windows-msvc' then
table.insert(launch_menu, {
label = 'PowerShell',
args = { 'powershell.exe', '-NoLogo' },
})
for _, vsvers in ipairs(
wezterm.glob('Microsoft Visual Studio/20*', 'C:/Program Files (x86)')
) do
local year = vsvers:gsub('Microsoft Visual Studio/', '')
table.insert(launch_menu, {
label = 'x64 Native Tools VS ' .. year,
args = { 'cmd.exe', '/k',
'C:/Program Files (x86)/' .. vsvers ..
'/BuildTools/VC/Auxiliary/Build/vcvars64.bat' },
})
end
end
return { launch_menu = launch_menu }
```
---
## Key Takeaways
- WezTerm ignores `$SHELL` — it reads the password database; set `set_environment_variables` if you need to override downstream
- `config.default_prog` replaces the default shell for all new tabs/windows
- `wezterm start -- <cmd>` launches a one-off program from the CLI
- CWD inherits via OSC 7 → process group → `default_cwd` → home; shell integration is the most reliable path
- The Launcher Menu (right-click `+`) is extensible with `config.launch_menu` using `SpawnCommand` objects
- Windows users can dynamically populate the menu using `wezterm.glob` + `wezterm.target_triple`
---
## Related
- [[wiki/dotfiles/wezterm-config|WezTerm Config — Files & Structure]]
- [[wiki/dotfiles/wezterm-cli-reference|WezTerm CLI Reference]]
- [[wiki/dotfiles/wezterm-key-bindings|WezTerm Key Bindings]]
- [[wiki/dotfiles/fish-shell-intro|Fish Shell Intro]]
---
## Sources
- `raw/Launching Programs - Wez's Terminal Emulator.md` — scraped from wezterm.org/config/launch.html