Replies: 2 comments
|
Just adding a bit more context to the POC I linked above 🙂 This comes from the project-switching workflow in my dotfiles (https://github.com/panakour/dotfiles). With my tmux-sessionizer script (https://github.com/panakour/dotfiles/blob/20b51ea44d8cfcb66ef8a2ec9c0416af7cd14cd9/bins/bin/tmux-sessionizer), I open an fzf picker, choose a project directory, and switch to its session in the same terminal. If the session doesn’t exist, the script creates it in that directory. The useful part is coming back later: my editor, shells, and running processes are still there, exactly where I left them. I tend to jump between projects throughout the day, so this is something I use a lot. My first Herdr version used a workspace per project within one session. That works, but I’d prefer to keep each project in its own named session, with its own workspaces, tabs, and panes. I’ve also put the POC on a clean, single-commit branch (https://github.com/panakour/herdr/tree/feature/client-session-switch-clean) for reference. Curious whether this fits how you see named sessions being used in Herdr. Happy to explain more about the workflow or try a different approach if there’s a better fit. |
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
I recently moved from tmux to Herdr and ported my tmux-sessionizer script. In tmux, I pick a project with fzf and switch to its own session in the same terminal. Each project keeps its own windows and panes, and the previous project keeps running in the background.
My Herdr script currently creates a workspace per project, so all projects appear under Spaces in the same session. I would like to use a separate named session per project and switch between them from my picker.
I am using Herdr 0.9.0 on macOS. I found
session attach, but I could not find a CLI or API command that moves the already attached client to another named session.requested change
Could Herdr expose this through the CLI/API so a plugin or custom command can switch the current client to another named session?
The flow I want is:
The plugin could handle project discovery and the picker. The missing part is a supported way to identify the client that opened it and ask that client to switch sessions.
why you want this
This would let me keep my tmux-sessionizer workflow with separate project sessions, without maintaining a custom launcher or a Herdr fork.
Related: #2848 asks for programmatic detach, and #4014 asks for custom commands to target the client that pressed the shortcut. This request is specifically about switching that client between named sessions.
All reactions