This project is a a vibe-coded re-implementation of tmux-fzf by @sainnhe, using Bubble Tea.
- Go 1.21+
tmuxavailable in$PATH
The repository is configured to keep Go build artifacts inside the workspace so it works cleanly in sandboxed environments. Use the supplied Makefile targets:
make build # builds the binary ./tmux-popup-control
make run # runs the application
make tidy # refreshes go.mod/go.sum
make fmt # gofmt on the repositoryEach target ensures local caches exist at .gocache and .gomodcache and sets
GOFLAGS=-modcacherw so Go can write to them.
To clear the local caches, run:
make clean-cache- Specify a tmux socket explicitly with
--socket /path/to/socket. - Alternatively set
TMUX_POPUP_SOCKETor rely on the active$TMUXvalue. - Launch directly into a submenu with
--root-menu window(or any other menu identifier such aspane:swap). SetTMUX_POPUP_CONTROL_ROOT_MENUto apply the same override via the environment.
Errors and trace output are written to a log file. By default the file is
tmux-popup-control.log in the working directory, but you can change this via
the --log-file command-line option or by setting the
TMUX_POPUP_CONTROL_LOG environment variable.
- Refactored the UI layer:
internal/ui/model.gois now decomposed into focused files (commands.go,navigation.go,input.go,view.go,prompt.go,forms.go,backend.go) with a supportingdoc.go, making message handling, prompts, and rendering easier to reason about and test. - Moved menu state management into the
internal/ui/statepackage and split responsibilities acrosslevel.go,selection.go,cursor.go,filter.go, anditems.go, alongside new cursor/filter unit tests to raise coverage. - Reworked the tmux client package into modular files (
types.go,snapshots.go,windows.go,panes.go,sessions.go,command.go), expanded the fake client, and added extensive unit/integration coverage; session detaches now skip when no clients are attached.