From af2894c6fcd90d70f062ce62b866939686fbe7f2 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 1 Feb 2020 22:02:54 +0000 Subject: [PATCH] chore(core): Make Emacs play nice when run in a terminal Ever since I started using persp-mode, launching Emacs in a terminal has made it restore the same set of open files as in my main GUI instance of Emacs. This hasn't been a big deal, but still somewhat annoying. I've finally gotten around to disabling persp-mode's auto save/load feature when running Emacs in a terminal. And for good measure, I also set the theme to be doom-vibrant in the terminal too. My old tomorrow-night-paradise is way out of date, and nowhere near as good as doom-vibrant. --- core/siren-core-theme.el | 5 ++--- modules/workspaces/siren-persp-mode.el | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/siren-core-theme.el b/core/siren-core-theme.el index 582406d..11572c7 100644 --- a/core/siren-core-theme.el +++ b/core/siren-core-theme.el @@ -9,9 +9,8 @@ (setq siren-themes-dir (expand-file-name "themes" siren-dir)) (siren-recursive-add-to-load-path siren-themes-dir) -(if window-system - (require 'siren-theme-doom-vibrant) - (require 'siren-theme-tomorrow-night-paradise)) +;; Use doom-vibrant theme +(require 'siren-theme-doom-vibrant) (provide 'siren-core-theme) ;;; siren-core-theme.el ends here diff --git a/modules/workspaces/siren-persp-mode.el b/modules/workspaces/siren-persp-mode.el index 2e44202..20ae716 100644 --- a/modules/workspaces/siren-persp-mode.el +++ b/modules/workspaces/siren-persp-mode.el @@ -52,6 +52,12 @@ (persp-nil-name "nil") :init + ;; Do not auto save/load in terminal. My main instance of Emacs runs in GUI, + ;; terminal based instances are for smaller random things. + (when (not window-system) + (setq persp-auto-resume-time -1 + persp-auto-save-opt 0)) + (defun siren-persp-mode-ibuffer (arg) (interactive "P") (with-persp-buffer-list () (ibuffer arg)))