branch: externals/nano-modeline commit d18fa489995f6d2d8e612945a87f1e59e6497d17 Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Update documentation --- README.md | 31 +++++++++++++++---------------- nano-modeline.el | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 015d6f4e8f..04b6daae79 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,12 @@ Nano modeline is a an alterntive to the GNU/Emacs modeline. It can be displayed at the bottom (mode-line) or at the top (header-line) -depending on nano-modeline-position custom setting. +depending on nano-modeline-position custom setting. There are several +modelines that can be installed on a per-mode basis or be made the +default one. Currently, only the prog and text mode are generic enough +to be made the default. + +You can also design your own modeline using the various elements composing a modeline. See sources for several example. ### Installation @@ -26,24 +31,18 @@ Install with `M-: (package-install 'nano-modeline)` (add-hook 'org-agenda-mode-hook #'nano-modeline-org-agenda-mode) ``` +To make a specific mode the default one, you can type: + +```emacs-lisp +(nano-modeline-text-mode t) +``` + +Currently, only the prog and text mode are generic enough to be made the +default. + ### Screenshots (using [N Λ N O theme](https://github.com/rougier/nano-theme)):  - - - - - - - - - - - - - - - diff --git a/nano-modeline.el b/nano-modeline.el index 262dd898b4..e0c34d6e0d 100644 --- a/nano-modeline.el +++ b/nano-modeline.el @@ -24,10 +24,21 @@ ;; see <https://www.gnu.org/licenses/>. ;;; Commentary: -;; +;; +;; Nano modeline is a an alterntive to the GNU/Emacs modeline. It can +;; be displayed at the bottom (mode-line) or at the top (header-line) +;; depending on the nano-modeline-position custom setting. There are +;; several modelines that can be installed on a per-mode basis or as +;; the default one. ;; ;; Usage example: ;; +;; Install prog mode modeline: +;; (add-hook 'prog-mode-hook #'nano-modeline-prog-mode) +;; +;; Make text mode modeline the default: +;; (nano-modeline-text-mode t) +;; ;; ;;; NEWS: ;; @@ -133,7 +144,9 @@ ,(when (facep 'nano-popout-i) 'nano-popout-i))) (bold-active . (bold)) (faded-active . (,(when (facep 'nano-faded) 'nano-faded)))) - "Nano line faces" + "Nano line faces. + +Each face defined here is used by the modeline depending on the current state (active / inactive). It is ok to define a face for a single state. In such case, the alternative state will use defaults." :type '(alist :key-type (symbol :tag "Face") :value-type (repeat :tag "inherits" face)))