Never lose your Eyebrowse window configurations again.
The package is in MELPA
(use-package eyebrowse-restore
:ensure t
:config
(eyebrowse-restore-mode))
Or install it from upstream using Quelpa (or your preferred package manager)
(use-package eyebrowse-restore
:ensure t
:quelpa (eyebrowse-restore
:fetcher github
:repo "FrostyX/eyebrowse-restore"
:branch "main")
:config
(eyebrowse-restore-mode))
All Eyebrowse window configurations for all Emacs frames are
automatically saved with a periodicity of
eyebrowse-restore-save-interval
. If you want to invoke this action
manually, run M-x eyebrowse-restore-save-all
.
Apart from that, when closing an Emacs frame, its Eyebrowse window configurations are saved beforehand.
After an Emacs crash, god forbid, simply run M-x
eyebrowse-restore
to use Eyebrowse workspace from a backup of
your choice.
For a better experience, I recommend naming your Emacs frames, e.g.
(set-frame-parameter nil 'name "Main")
There is no locking mechanism that would prevent multiple Emacs
instances from overriding each other’s backups. Either enable
eyebrowse-restore-mode
only for one instance or configure
eyebrowse-restore-dir
to a different directory for each instance.
Eyebrowse separates window configurations per Emacs frame (in opposite
to Emacs instance). This is intended behavior and it is rooted in the
implementation details. In a daemon setup, window configurations are
assigned to an emacsclient
frame instead of the daemon instance,
i.e. closing an emacsclient
destroys all of its Eyebrowse window
configurations.
Making window configurations shared across all Emacs frames is a controversial topic because the use-case is nonsensical for the majority of users.
The main issue for me is not the absence of sharing window configurations across all frames but recovering from reboots, window manager crashes, Emacs crashes, or anything else that results in having to spawn a new Emacs instance from scratch.
Thanks to the desktop.el, Eyebrowse supports persistent window configurations with one caveat - it is reliable only for single-frame use. When using multiple Emacs frames, it depends in what order the frames are closed, and only the last one is remembered.
The eyebrowse-restore
prevents you from losing the window
configurations for the rest of the frames.