vde-layout 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ bun add -g vde-layout
20
20
  ```
21
21
 
22
22
  ## Quick Start
23
- 1. Create a YAML file at `~/.config/vde/layout.yml` (or any supported location; see Configuration Search Order).
23
+ 1. Create a YAML file at `~/.config/vde/layout.yml` (or any supported location; see "Configuration Search Order").
24
24
  2. Paste a preset definition:
25
25
  ```yaml
26
26
  presets:
@@ -56,24 +56,24 @@ bun add -g vde-layout
56
56
  ```
57
57
 
58
58
  ## CLI Commands
59
- - `vde-layout [preset]` Apply the named preset. When omitted, vde-layout uses the `default` preset; if none exists it lists available presets and exits.
60
- - `vde-layout list` Show available presets with descriptions.
61
- - `vde-layout dev --dry-run` Display the tmux steps without executing them.
62
- - `vde-layout dev --verbose` Print informational logs, including resolved presets and plan details.
63
- - `vde-layout dev --backend wezterm` Use the WezTerm backend (defaults to `tmux` when omitted).
64
- - `vde-layout dev --current-window` Reuse the current tmux window (or active WezTerm tab) after confirming that other panes can be closed.
65
- - `vde-layout dev --new-window` Force creation of a new tmux window or WezTerm tab even when presets or defaults request reuse.
66
- - `vde-layout --config /path/to/layout.yml` Load presets from a specific file.
67
- - `vde-layout --help` Show usage.
68
- - `vde-layout --version` / `vde-layout -v` Print package version (`-V` is kept for compatibility).
59
+ - `vde-layout [preset]` - Apply the named preset. When omitted, vde-layout uses the `default` preset; if none exists it lists available presets and exits.
60
+ - `vde-layout list` - Show available presets with descriptions.
61
+ - `vde-layout dev --dry-run` - Display the tmux steps without executing them.
62
+ - `vde-layout dev --verbose` - Print informational logs, including resolved presets and plan details.
63
+ - `vde-layout dev --backend wezterm` - Use the WezTerm backend (defaults to `tmux` when omitted).
64
+ - `vde-layout dev --current-window` - Reuse the current tmux window (or active WezTerm tab) after confirming that other panes can be closed.
65
+ - `vde-layout dev --new-window` - Force creation of a new tmux window or WezTerm tab even when presets or defaults request reuse.
66
+ - `vde-layout --config /path/to/layout.yml` - Load presets from a specific file.
67
+ - `vde-layout --help` - Show usage.
68
+ - `vde-layout --version` / `vde-layout -v` - Print package version.
69
69
 
70
70
  > **Note:** Applying a preset (without `--dry-run`) must be done inside an active tmux session when using the tmux backend. For the WezTerm backend, ensure a WezTerm window is running and focused so the CLI can discover it.
71
71
 
72
72
  ## Terminal Backends
73
73
  vde-layout resolves backends in the following order: CLI flag (`--backend`), preset configuration, then defaults to `tmux`.
74
74
 
75
- - **tmux (default)** Requires an active tmux session for non-dry runs. `--current-window` closes other panes in the selected window after confirmation; `--new-window` always creates a new tmux window.
76
- - **WezTerm** Requires the `wezterm` CLI to be available (nightly channel recommended). Start WezTerm beforehand so at least one window exists.
75
+ - **tmux (default)** - Requires an active tmux session for non-dry runs. `--current-window` closes other panes in the selected window after confirmation; `--new-window` always creates a new tmux window.
76
+ - **WezTerm** - Requires the `wezterm` CLI to be available (nightly channel recommended). Start WezTerm beforehand so at least one window exists.
77
77
  - `--current-window` targets the active tab and confirms before closing other panes.
78
78
  - `--new-window` spawns a new tab in the active window when one is available, otherwise creates a fresh window.
79
79
 
@@ -124,9 +124,9 @@ layout:
124
124
  ### Template Tokens
125
125
  You can reference dynamically-assigned pane IDs within pane commands using template tokens. These tokens are resolved after the layout finishes splitting panes but before commands execute:
126
126
 
127
- - **`{{this_pane}}`** References the current pane receiving the command
128
- - **`{{focus_pane}}`** References the pane that will receive focus
129
- - **`{{pane_id:<name>}}`** References a specific pane by its name
127
+ - **`{{this_pane}}`** - References the current pane receiving the command
128
+ - **`{{focus_pane}}`** - References the pane that will receive focus
129
+ - **`{{pane_id:<name>}}`** - References a specific pane by its name
130
130
 
131
131
  Example:
132
132
  ```yaml
@@ -188,9 +188,9 @@ panes:
188
188
 
189
189
  ### Ratio Normalization
190
190
  Ratios can be any set of positive integers. vde-layout normalizes them to percentages:
191
- - `[1, 1]` `[50, 50]`
192
- - `[2, 3]` `[40, 60]`
193
- - `[1, 2, 1]` `[25, 50, 25]`
191
+ - `[1, 1]` -> `[50, 50]`
192
+ - `[2, 3]` -> `[40, 60]`
193
+ - `[1, 2, 1]` -> `[25, 50, 25]`
194
194
 
195
195
  ### Single Command Presets
196
196
  If you omit `layout`, the preset runs a single command in one pane (or opens the default shell when `command` is omitted):
@@ -216,11 +216,11 @@ presets:
216
216
  - If an error occurs (for example, a tmux command fails or the configuration is invalid), vde-layout returns a structured error with the failing step and guidance.
217
217
 
218
218
  ## Environment Variables
219
- - `VDE_CONFIG_PATH` Override the base directory for configuration files.
220
- - `XDG_CONFIG_HOME` XDG base directory root; defaults to `~/.config` when unset.
221
- - `VDE_DEBUG=true` Enable debug-level logs (includes stack traces).
222
- - `VDE_VERBOSE=true` Enable info-level logs without full debug output.
223
- - `TMUX` Automatically set by tmux. vde-layout checks this to ensure execution happens inside a session.
219
+ - `VDE_CONFIG_PATH` - Override the base directory for configuration files.
220
+ - `XDG_CONFIG_HOME` - XDG base directory root; defaults to `~/.config` when unset.
221
+ - `VDE_DEBUG=true` - Enable debug-level logs (includes stack traces).
222
+ - `VDE_VERBOSE=true` - Enable info-level logs without full debug output.
223
+ - `TMUX` - Automatically set by tmux. vde-layout checks this to ensure execution happens inside a session.
224
224
 
225
225
  ## Requirements
226
226
  - Node.js 22 or higher