layout: make layout name shorter in microstate line

If layout name is long path, it takes up too much space.
This commit is contained in:
Muneeb Shaikh 2015-12-19 23:10:11 +05:30 committed by syl20bnr
parent 954104a792
commit 1d79589e7c

View file

@ -60,8 +60,11 @@
(logxor spacemacs--layouts-ms-doc-toggle 1)))
(defun spacemacs//layout-format-name (name pos)
"Format the layout name given by NAME for display in mode-line."
(let* ((string-name (format "%s" name))
"Format the layout name given by NAME for display in mode-line."
(let* ((layout-name (if (file-directory-p name)
(file-name-nondirectory (directory-file-name name))
name))
(string-name (format "%s" layout-name))
(current (equal name (spacemacs//current-layout-name)))
(caption (concat (number-to-string (if (eq 9 pos) 0 (1+ pos)))
":" string-name)))