summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org21
1 files changed, 21 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 7cdf2090..96b3fe92 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -944,6 +944,27 @@ Workspaces, a bit like dwm.
             (eyebrowse-mode +1)))
 #+END_SRC
 
+* Sessions
+
+** Desktop
+Save my Emacs session and restore it on startup.
+
+#+BEGIN_SRC emacs-lisp
+(use-package desktop
+  :ensure nil
+  :config (progn
+            (setq desktop-dirname (expand-file-name "desktop/" user-emacs-directory)
+                  desktop-base-file-name "emacs.desktop"
+                  desktop-base-lock-name "lock"
+                  desktop-path (list desktop-dirname)
+                  desktop-save 'if-exists
+                  desktop-files-not-to-save "^$"
+                  desktop-load-locked-desktop nil)
+            (unless (file-directory-p desktop-dirname)
+              (make-directory desktop-dirname))
+            (desktop-save-mode 1)))
+#+END_SRC
+
 ** winner
 
 Undo, for window-based commands.