tmuxp icon indicating copy to clipboard operation
tmuxp copied to clipboard

Support freezing & loading windows

Open dufferzafar opened this issue 5 years ago • 3 comments

Currently, tmuxp operates at session level. So it takes in a session name, dumps it to a file and can then be used to load from that. I propose that we should also support saving and loading of individual windows.

I needed this today and for now, I froze the current session, edited the file manually to remove info of all other windows, then loaded the session, and moved the window to my current session.

The API would be something like:

tmuxp freeze -w [window_name] file_name

tmuxp load -w file_name

I looked at the code and this doesn't seem hard to do. If I ever need this again, I'll be up to making the relevant changes.

https://github.com/tmux-python/tmuxp/blob/master/tmuxp/workspacebuilder.py#L353

dufferzafar avatar Apr 09 '20 09:04 dufferzafar

@dufferzafar Would something like https://github.com/tmux-python/tmuxp/pull/656 be the functionality you are after for your workflow? or is specific window freezing & loading needed?

joseph-flinn avatar Jan 18 '21 19:01 joseph-flinn

@joseph-flinn Though #656 is good as a workaround, I think being able to specify window names to freeze / load would be great!

I'll try the approach specified in #656 some time later.

dufferzafar avatar Jan 20 '21 07:01 dufferzafar

@dufferzafar Great! I didn't want to assume what the use case was and close the Issue prematurely.

joseph-flinn avatar Jan 20 '21 15:01 joseph-flinn