-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to save window layout and persist between sessions #2832
Comments
Ah -- I tried to a search -- but I guess my keywords sucked... |
It seems there's some setup for this in spacemacs' config.el, which is disabled... |
so it seems...I guess having this issue isn't going to harm things...I don't know why it's commented out...probably because it doesn't play well...and breaks things... |
Well, config.el says about the desktop configuration that "The following code is kept as reference" (line 281). I have used desktop-save-mode several times manually - |
@bmag was it in spacemacs? |
yes |
This comment is strictly for reference, once #1958 is merged into |
I bound some custom bindings to desktop-save-in-desktop-dir and desktop-read which I manually run whenever I need it. In my experience these have worked fine, but the automatic saving and loading does not seem to work from desktop-save-mode. No error, but it doesn't reload the window layout. |
@bmag would be cool to be able to save multiple sessions and listing them on the home buffer. |
@syl20bnr if you're talking about sessions as understood by the |
|
persp-mode is an alternative version of perspective. It can do everything |
Here is my configuration for (defun tuhdo/init-persp-mode ()
(use-package persp-mode
:init
(setq persp-save-dir spacemacs-cache-directory)
(setq persp-lighter "")
(evil-leader/set-key
"Ll" 'persp-load-state-from-file
"Ls" 'persp-save-state-to-file
"La" 'persp-add-buffer
"LA" 'persp-set-buffer
"Lc" 'persp-kill
"Lk" 'persp-remove-buffer
"Ln" 'persp-next
"Lp" 'persp-prev
"Lr" 'persp-rename
"Ls" 'persp-switch)
(with-eval-after-load 'persp-mode
(with-eval-after-load 'window-numbering
(define-key window-numbering-keymap (kbd "M-1") 'persp-add-buffer)
(define-key window-numbering-keymap (kbd "M-2") 'persp-remove-buffer)
(define-key window-numbering-keymap (kbd "M-3") 'persp-prev)
(define-key window-numbering-keymap (kbd "M-4") 'persp-next)
(define-key window-numbering-keymap (kbd "M-5") 'persp-switch))
(define-key persp-mode-map (kbd "M-1") 'persp-prev)
(define-key persp-mode-map (kbd "M-2") 'persp-next)))) |
I've just realized that Spacemacs already included |
@Thudo |
@tuhdo thanks for sharing your config. my only tweak was to change the mapping for switch, as it was shadowing save. |
It would be super neat if we could save our window layout and persist it between sessions. Making an issue just in case anyone wants it...also to open a dialogue :)
The text was updated successfully, but these errors were encountered: