summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-12-09 21:11:45 -0800
committerBlendoit <blendoit@gmail.com>2020-12-09 21:11:45 -0800
commitdab470a520902740b9962c5898406747f6df8fd6 (patch)
treeda6ddd32d61340fec0fb356810897a30638e1737
parent4f3594667990a3612be9f316b6942e1dc84efdc8 (diff)
mode-line format :eyes:
-rw-r--r--smart-documents.org31
1 files changed, 23 insertions, 8 deletions
diff --git a/smart-documents.org b/smart-documents.org
index 37cec4f..988e5d3 100644
--- a/smart-documents.org
+++ b/smart-documents.org
@@ -966,16 +966,31 @@ We hide minor modes in the mode line.
#+BEGIN_SRC emacs-lisp :tangle yes
(use-package rich-minority)
(rich-minority-mode 1)
- (setf rm-blacklist "")
- (insert (format "%s" mode-line-format))
+ (setf rm-whitelist "projectile")
#+END_SRC
-#+BEGIN_SRC emacs-lisp :tangle no
- (%e mode-line-front-space mode-line-mule-info mode-line-client
- mode-line-modified mode-line-remote
- mode-line-frame-identification mode-line-buffer-identification
- mode-line-position (vc-mode vc-mode) mode-line-modes
- mode-line-misc-info mode-line-end-spaces)
+This interpretation of the ideal mode line is the result of
+carefully studying the default ~mode-line~, as well as studying
+various customizations online.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ ;; (%e mode-line-front-space mode-line-mule-info mode-line-client
+ ;; mode-line-modified mode-line-remote
+ ;; mode-line-frame-identification mode-line-buffer-identification
+ ;; mode-line-position (vc-mode vc-mode) mode-line-modes
+ ;; mode-line-misc-info mode-line-end-spaces)
+
+ (setq-default mode-line-format
+ (list
+ mode-line-front-space
+ '(:eval (if buffer-read-only
+ (propertize "🔒" 'help-echo "C-x C-q: unlock buffer.")
+ (propertize "🔓" 'help-echo "C-x C-q: lock buffer.")))
+ " " mode-line-buffer-identification " "
+ '(:eval (if (buffer-modified-p) "🖉" "✓"))
+ " " mode-line-modes " "
+ mode-line-end-spaces))
+
#+END_SRC
*** Emojis
Copyright 2019--2024 Marius PETER