Stay running for tmux, which draws the menus it asks for (--serve) #228
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/fzt-automate!228
Loading…
Reference in a new issue
No description provided.
Delete branch "resident-serve"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
fzt-automate --serve: fzt-automate stays running and runs the at menu for tmux over its standard input and output, so opening the menu no longer starts a program each time. Starting one cost 60 to 200 ms before the menu drew; in a running program the menu draws in a few.Added
serve.go: the frames tmux and fzt-automate exchange (open a menu with its size, arguments and standard input; input; resize; close; draw; exit with code and standard output; quit). Each menu runs as--popupwould, on a tcell screen of its own over that pipe (tui.RunLoopOn, from fzt-terminal). Several menus can be open at once.Changed, with no change in behaviour
main.go's menu setup is split intomenu.go(parseMenuArgs,menuConfig,popupMain), so--popupand--serveshare it.runPopuptakes an optional screen.Not changed:
--popupstarted directly works as before, and nothing uses--serveuntil at-tmux'sdisplay-palette -Sdoes. That change is the next PR and has to land after this one is released.Tests:
TestServedPopupPicksTmuxRowruns--serveas a process and picks one of tmux's rows through the frames. Two menus at once, tmux closing a menu, the quit after a release once the last menu ends, refusing anything but--popup, and Escape arriving as CSI 27 u are tested in process.Work package: https://openproject.home.romaine.life/wp/FZTA-25
🤖 Generated with Claude Code