vde-layout 1.0.2 → 1.1.0

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
@@ -68,6 +68,11 @@ pnpm run ci
68
68
  ## CLI Commands
69
69
  - `vde-layout [preset]` - Apply the named preset. When omitted, vde-layout uses the `default` preset; if none exists it lists available presets and exits.
70
70
  - `vde-layout list` - Show available presets with descriptions.
71
+ - `vde-layout --select` - Open an interactive preset selector (auto mode; currently uses `fzf`).
72
+ - `vde-layout --select --select-ui fzf` - Force the selector backend (`auto` or `fzf`).
73
+ - `vde-layout --select --select-surface tmux-popup` - Render selector in a tmux popup (`fzf --tmux`).
74
+ - `vde-layout --select --select-tmux-popup-opts "80%,70%"` - Pass popup sizing/placement to `fzf --tmux=<opts>`.
75
+ - `vde-layout --select --fzf-arg "--cycle" --fzf-arg "--info=inline"` - Pass additional argument(s) to `fzf` (repeatable).
71
76
  - `vde-layout dev --dry-run` - Display the tmux steps without executing them.
72
77
  - `vde-layout dev --verbose` - Print informational logs, including resolved presets and plan details.
73
78
  - `vde-layout dev --backend wezterm` - Use the WezTerm backend (defaults to `tmux` when omitted).
@@ -78,6 +83,8 @@ pnpm run ci
78
83
  - `vde-layout --version` / `vde-layout -v` - Print package version.
79
84
 
80
85
  > **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.
86
+ >
87
+ > **Selector UI note:** `--select` requires an interactive terminal and `fzf` on `$PATH`. `--select-surface tmux-popup` requires running inside tmux (`fzf --tmux`, tmux 3.3+ recommended).
81
88
 
82
89
  ## Terminal Backends
83
90
  vde-layout resolves backends in the following order: CLI flag (`--backend`), preset configuration, then defaults to `tmux`.
@@ -89,7 +96,7 @@ vde-layout resolves backends in the following order: CLI flag (`--backend`), pre
89
96
 
90
97
  ## Configuration Search Order
91
98
  When no `--config` flag is provided, vde-layout checks candidate files in this order for `findConfigFile()`:
92
- 1. `<project-root>/.vde/layout.yml` (discovered by walking up from the current directory).
99
+ 1. Project scope discovered by walking up from the current directory; for each directory, vde-layout checks `.vde/layout/config.yml` first, then `.vde/layout.yml`.
93
100
  2. `$VDE_CONFIG_PATH/layout.yml` (if `VDE_CONFIG_PATH` is set).
94
101
  3. `$XDG_CONFIG_HOME/vde/layout/config.yml` (or `~/.config/vde/layout/config.yml` when `XDG_CONFIG_HOME` is unset).
95
102
  4. `$XDG_CONFIG_HOME/vde/layout.yml` fallback (or `~/.config/vde/layout.yml`).
@@ -97,7 +104,7 @@ When no `--config` flag is provided, vde-layout checks candidate files in this o
97
104
  For `loadConfig()`, vde-layout merges shared scopes first and project scope last:
98
105
  1. `$VDE_CONFIG_PATH/layout.yml`
99
106
  2. XDG scope (`.../vde/layout/config.yml` or fallback `.../vde/layout.yml`; first existing file only)
100
- 3. `<project-root>/.vde/layout.yml`
107
+ 3. Project scope (`<project-root>/.vde/layout/config.yml` or fallback `<project-root>/.vde/layout.yml`, discovered by walking up from the current directory)
101
108
 
102
109
  ## Preset Structure
103
110
  Each preset is an object under the `presets` key:
@@ -113,6 +120,21 @@ presets:
113
120
  command: "htop" # optional; used when layout is omitted
114
121
  ```
115
122
 
123
+ ### Defaults Structure
124
+ Global/project defaults can be defined under `defaults`:
125
+ ```yaml
126
+ defaults:
127
+ windowMode: new-window
128
+ selector:
129
+ ui: auto # auto | fzf
130
+ surface: auto # auto | inline | tmux-popup
131
+ tmuxPopupOpts: "80%,70%" # passed to fzf as --tmux=<value>
132
+ fzf:
133
+ extraArgs: # additional arguments passed to fzf
134
+ - --cycle
135
+ - --info=inline
136
+ ```
137
+
116
138
  ### Layout Structure
117
139
  ```yaml
118
140
  layout: