<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/cj-window-toggle-lib.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-06-05T10:28:58+00:00</updated>
<entry>
<title>feat(term): replace vterm with ghostel as the terminal engine</title>
<updated>2026-06-05T10:28:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-05T10:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ebdf9e466b0e1f86e9b7d76650ac32408273e7a7'/>
<id>urn:sha1:ebdf9e466b0e1f86e9b7d76650ac32408273e7a7</id>
<content type='text'>
I swapped the terminal engine from vterm to ghostel (libghostty-vt) everywhere. term-config replaces vterm-config (the F12 terminal, the C-; x menu, tmux history capture), and ai-term replaces ai-vterm (the F9 Claude-agent launcher). ghostel renders the agent TUI without vterm's flicker under heavy streaming, and one engine now covers every terminal workflow.

Two behavior changes fall out of the swap. F9 launches in a terminal frame now: ghostel renders in TTY frames, so the old GUI-only guard is gone. Terminal windows no longer dim when unfocused: ghostel resolves its palette into the native module per-terminal, so there's no per-window color hook to dim through the way vterm had.

auto-dim drops its vterm color-advice path, the dashboard Terminal button launches ghostel, and the vterm and vterm-toggle packages are removed. The tmux pane-history and copy-mode machinery carried over unchanged. It keys on the pty tty, which ghostel exposes.
</content>
</entry>
<entry>
<title>fix(vterm): never reopen the F9/F12 windows from the top</title>
<updated>2026-05-28T01:48:12+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-28T01:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7833fb8bc0e3f9ece01ab2fe6fe07ded0efc4af4'/>
<id>urn:sha1:7833fb8bc0e3f9ece01ab2fe6fe07ded0efc4af4</id>
<content type='text'>
F9 brought the agent window down from the top of the frame. The toggle remembers where the window last sat and replays it, and "above" was a position it could capture and replay: move the window to the top with the buffer-move keys, toggle off, and the next toggle reopened it up there. The host default never picks the top, so a remembered "above" was the only way in.

I added an optional allowed-directions list to cj/window-toggle-capture-state, the helper both F9 (ai-vterm) and F12 (vterm-config) share. When the captured direction isn't in the list, it falls back to the default direction and clears the saved size, since that size was measured on the disallowed axis and wouldn't transfer. Both dispatchers now pass (right below left), so neither can remember a top placement. They go through the same helper, so the rule stays in one place.

Three tests cover the new branch: a permitted direction is kept, a disallowed one falls back with the size cleared, and an omitted list preserves the old unconstrained behavior so existing callers are unaffected.
</content>
</entry>
<entry>
<title>feat(window): remember a side window's size across toggles</title>
<updated>2026-05-27T19:36:57+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-27T19:36:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=84d8ab6a3ad97697a717a770c42010e9ec9076e5'/>
<id>urn:sha1:84d8ab6a3ad97697a717a770c42010e9ec9076e5</id>
<content type='text'>
The F10 music playlist opened at a fixed fraction every time, so any manual resize was lost the moment it was toggled closed. Now the toggle captures the window's size on close and reopens at that height, for the rest of the session.

The mechanism is generic, not music-specific. cj/window-size-fraction (geometry-lib) is the pure kernel: a clamped window/frame ratio. cj/side-window-capture-size and cj/side-window-display (toggle-lib) wrap it for any display-buffer-in-side-window consumer — height for top/bottom, width for left/right — storing the remembered fraction in a caller-supplied state var. It mirrors the direction-split toggle pattern the vterm dispatchers already use, but for atomic side windows that can't be split.

music-config wires F10 to it: cj/music-playlist-window-height is the default, cj/--music-playlist-height holds the remembered value (in-memory, resets each session).

12 new tests across the two libs, Normal/Boundary/Error each covered.
</content>
</entry>
<entry>
<title>refactor(cj-window-geometry): rename to cj-window-geometry-lib</title>
<updated>2026-05-10T20:31:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-10T20:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=8c12629f8c4c8726b7b74ad3912abd9cd1cade9c'/>
<id>urn:sha1:8c12629f8c4c8726b7b74ad3912abd9cd1cade9c</id>
<content type='text'>
Same naming-convention fix as the other library renames in this series.

Rename modules/cj-window-geometry.el -&gt; modules/cj-window-geometry-lib.el
and tests/test-cj-window-geometry.el -&gt; tests/test-cj-window-geometry-lib.el.
Update provide forms, file headers, and the (require 'cj-window-geometry)
call sites in cj-window-toggle-lib.el, ai-vterm.el, vterm-config.el,
and the test file.

No behavior change.
</content>
</entry>
<entry>
<title>refactor(cj-window-toggle): rename to cj-window-toggle-lib for naming consistency</title>
<updated>2026-05-10T20:28:31+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-10T20:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a2e41803d7d29a43ed37a5cf9fd7fe53ca5c15b5'/>
<id>urn:sha1:a2e41803d7d29a43ed37a5cf9fd7fe53ca5c15b5</id>
<content type='text'>
Rename modules/cj-window-toggle.el -&gt; modules/cj-window-toggle-lib.el
and tests/test-cj-window-toggle.el -&gt; tests/test-cj-window-toggle-lib.el.
Update provide forms, file headers, and the (require 'cj-window-toggle)
call sites in ai-vterm.el, vterm-config.el, and the test file.

Same rationale as the cj-cache and cj-org-text renames -- library files
in this codebase are suffixed `-lib'.  No behavior change.
</content>
</entry>
</feed>
