Is it possible to save and restore the status of yazi? #965
Replies: 6 comments 4 replies
-
DDS is designed to achieve this, see the docs at https://yazi-rs.github.io/docs/dds You can find more examples about DDS on the v0.2.5 release page, https://github.com/sxyazi/yazi/releases/tag/v0.2.5 |
Beta Was this translation helpful? Give feedback.
-
I also read the content of Could you please give a simple example? |
Beta Was this translation helpful? Give feedback.
-
I read the content of But it seems that Currently
So, I thought if it is possible to provide a feature to initialize |
Beta Was this translation helpful? Give feedback.
-
I think DDS currently supports the functionality you mentioned. You can bind a
so that you will receive this event again the next time Yazi starts through This is an example of how the |
Beta Was this translation helpful? Give feedback.
-
Oh, I totally didn't expect But after a rough search, I couldn't figure out where |
Beta Was this translation helpful? Give feedback.
-
OK, I wrote this function as a plugin, here is its repository projects.yazi. By the way, I want to do something before exiting
I also thought about implementing it through a key: local quit_and_save_last = ya.sync(function(state)
local projects = _get_projects()
projects.last = _get_current_project()
_save_state(projects)
ya.manager_emit("quit", {})
end) This can be done, but a window will pop up before quit: prompting that there is still 1 task that has not been completed. So, is there any way to implement it? |
Beta Was this translation helpful? Give feedback.
-
Is it possible to save the current status when exiting yazi, and read and restore it when starting?
For example:
There may be three tabs at that time, each tab is in a different path, and some tabs may have changed the sorting method, etc.
Save the current status to
~/.yazi_session
when exiting.Afterwards,
~/.yazi_session
is read during startup, and the status of these three tabs can be restored later.Currently, is there any way to achieve this feature?
Beta Was this translation helpful? Give feedback.
All reactions