Ghostty Window Manager Commands | Generated by AI
Done. Two new commands added:
ww ghostty list # List all open Ghostty windows with ID, title, position, size
ww ghostty focus <N> # Focus window by index (e.g. 7) or title substring (e.g. "deepseek")
ww ghostty focus # No arg = list windows + usage hint
Files created:
- /Users/lzwjava/projects/ww/ww/ghostty/list_windows.py — CGWindowList enumeration via Swift
- /Users/lzwjava/projects/ww/ww/ghostty/focus.py — CGEvent mouse click to raise a window
Files modified:
- /Users/lzwjava/projects/ww/ww/main.py — dispatch + help text
How it works:
listusesCGWindowListCopyWindowInfo(no Accessibility permissions needed) to enumerate all Ghostty windowsfocusactivates the Ghostty app, then posts a CGEvent mouse click at the center of the target window’s bounds to raise it. Supports both 1-based index and case-insensitive title substring matching