How to create an empty session setup? #11
-
How can I configure easysession to create a minimal environment when a new session is started? I want to ensure that all windows and tabs are closed, leaving only the scratch buffer open. |
Beta Was this translation helpful? Give feedback.
Answered by
jamescherti
Aug 14, 2024
Replies: 1 comment
-
To set up a minimal environment when easysession creates a new session, you can define a function that closes all other tabs, deletes all other windows, and switches to the scratch buffer. The following Emacs Lisp code demonstrates how to achieve this: (defun my-empty-easysession ()
"Set up a minimal environment when easysession creates a new session."
(when (and (boundp 'tab-bar-mode) tab-bar-mode)
(tab-bar-close-other-tabs))
(delete-other-windows)
(scratch-buffer))
(add-hook 'easysession-new-session-hook #'my-empty-easysession) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To set up a minimal environment when easysession creates a new session, you can define a function that closes all other tabs, deletes all other windows, and switches to the scratch buffer. The following Emacs Lisp code demonstrates how to achieve this: