Allow customization of the default layout name in mode-line

- Changed dotspacemacs variable
This commit is contained in:
Muneeb Shaikh 2015-11-09 14:13:52 +05:30 committed by Eivind Fonn
parent 94fe2cb755
commit 6b3e82d2d9
3 changed files with 8 additions and 6 deletions

View File

@ -120,8 +120,8 @@ with `:' and Emacs commands are executed with `<leader> :'.")
(defvaralias 'dotspacemacs-remap-Y-to-y$ 'evil-want-Y-yank-to-eol
"If non nil `Y' is remapped to `y$'.")
(defvar dotspacemacs-display-default-layout nil
"If non nil then the `Default' layout name is displayed in the mode-line.")
(defvar dotspacemacs-default-layout-name nil
"If non nil then name of the default layout as a string to be displayed in the mode-line.")
(defvar dotspacemacs-use-ido nil
"If non nil then `ido' replaces `helm' for some commands. For now only

View File

@ -112,9 +112,9 @@ values."
dotspacemacs-command-key ":"
;; If non nil `Y' is remapped to `y$'. (default t)
dotspacemacs-remap-Y-to-y$ t
;; If non nil then the `Default' layout name is displayed in the mode-line
;; If non nil then name of the default layout as a string to be displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
dotspacemacs-default-layout-name nil
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.

View File

@ -36,12 +36,14 @@
(defvar spacemacs--layouts-autosave-timer nil
"Timer for layouts auto-save.")
(when dotspacemacs-display-default-layout
(when dotspacemacs-default-layout-name
;; load `persp-mode' if default perspective must be
;; displayed
(unless (bound-and-true-p persp-mode)
;; we need this check because calling persp-mode again seems to
;; reset the list of perspectives...
(when (stringp dotspacemacs-default-layout-name)
(setq persp-nil-name dotspacemacs-default-layout-name))
(persp-mode)))
(defun spacemacs/jump-to-last-layout ()
@ -304,4 +306,4 @@ format so they are supported by the
(fboundp 'safe-persp-name) (fboundp 'get-frame-persp)
(or (not (equal persp-nil-name
(safe-persp-name (get-frame-persp))))
dotspacemacs-display-default-layout))))
dotspacemacs-default-layout-name))))