doc: further tweaks of mode-line section

This commit is contained in:
syl20bnr 2018-01-12 00:06:50 -05:00
parent 726077faf1
commit 8914e78537
1 changed files with 33 additions and 27 deletions

View File

@ -80,9 +80,9 @@
- [[#anzu-integration][Anzu integration]]
- [[#battery-status-integration][Battery status integration]]
- [[#powerline-separators][Powerline separators]]
- [[#minor-modes][Minor Modes]]
- [[#all-the-icons-theme][All-the-Icons theme]]
- [[#custom-spaceline-theme][Custom spaceline theme]]
- [[#minor-modes][Minor Modes]]
- [[#frame-title][Frame title]]
- [[#iconified-tabified-title][Iconified (tabified) title]]
- [[#layouts-and-workspaces][Layouts and workspaces]]
@ -1274,9 +1274,7 @@ Currently supported themes are:
The default theme is =spacemacs= and this theme is described in more detailed in
the next section.
=all-the-icons= is the theme defined in the package [[https://github.com/domtronn/spaceline-all-the-icons.el][spaceline-all-the-icons]]. If you
want to use this theme you need to make sure to install the required fonts from
the package repository, see [[https://github.com/domtronn/all-the-icons.el/tree/master/fonts][all-the-icons fonts directory]].
=all-the-icons= is the theme defined in the package [[https://github.com/domtronn/spaceline-all-the-icons.el][spaceline-all-the-icons]].
=custom= is a user custom spaceline theme, see the guide in the following section.
@ -1396,7 +1394,37 @@ powerline, here is an exhaustive set of screenshots:
| =zigzag= | [[file:img/powerline-zigzag.png]] |
| =nil= | [[file:img/powerline-nil.png]] |
**** Minor Modes
*** All-the-Icons theme
If you want to use this theme you need to make sure to install the required
fonts from the package repository, see [[https://github.com/domtronn/all-the-icons.el/tree/master/fonts][all-the-icons fonts directory]].
To change the separator type set the variable
=spaceline-all-the-icons-separator-type=. All the powerline separators are
supported (see table above).
*** Custom spaceline theme
You can create your own Spaceline theme by setting the variable
=dotspacemacs-mode-line-theme= to =custom= and define a function called
=spaceline-custom-theme= in your =dotspacemacs/user-init= function of your
dotfile. This functions must accept a variadic number of arguments which are
additional segments added by Spacemacs (like a segment to notify about available
updates etc...).
Example:
#+BEGIN_SRC emacs-lisp
(defun spaceline-custom-theme (&rest additional-segments)
"My custom spaceline theme."
(spaceline-compile
`(major-mode (minor-modes :when active) buffer-id)
`((line-column :separator " | " :priority 3)
,@additional-segments))
(setq-default mode-line-format '("%e" (:eval (spaceline-ml-main)))))
#+END_SRC
Restart Emacs and enjoy your very own mode-line!
*** Minor Modes
Spacemacs uses [[https://www.emacswiki.org/emacs/DiminishedModes][diminish]] mode to reduce the size of minor mode indicators:
The minor mode area can be toggled on and off with ~SPC t m m~
@ -1447,28 +1475,6 @@ squared symbols like =🅿=.
| ~SPC t C-W~ | =Ⓦ= | W | automatic whitespace cleanup globally |
| ~SPC t y~ | =ⓨ= | y | [[https://github.com/capitaomorte/yasnippet][yasnippet]] mode |
*** All-the-Icons theme
*** Custom spaceline theme
You can create your own Spaceline theme by setting the variable
=dotspacemacs-mode-line-theme= to =custom= and define a function called
=spaceline-custom-theme= in your =dotspacemacs/user-init= function of your
dotfile. This functions must accept a variadic number of arguments which are
additional segments added by Spacemacs (like a segment to notify about available
updates etc...).
Example:
#+BEGIN_SRC emacs-lisp
(defun spaceline-custom-theme (&rest additional-segments)
"My custom spaceline theme."
(spaceline-compile
`(major-mode (minor-modes :when active) buffer-id)
`((line-column :separator " | " :priority 3)
,@additional-segments))
(setq-default mode-line-format '("%e" (:eval (spaceline-ml-main)))))
#+END_SRC
Restart Emacs and enjoy your very own mode-line!
** Frame title
Default frame title displays name of current process and hostname of system. You