]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Don't display some info no non-active mode lines
authorEshel Yaron <me@eshelyaron.com>
Sun, 6 Aug 2023 19:04:34 +0000 (22:04 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Aug 2023 19:04:34 +0000 (22:04 +0300)
.emacs.d/init.el

index 3d08a7b1ad5d2a8546f45177fa05d7a795c61cd3..feb44c689ca68aaac4eeed259a144340643fc807 100644 (file)
@@ -1275,6 +1275,9 @@ as the initial input for completion, and return that directory."
 (with-eval-after-load 'whitespace-cleanup-mode
   (setf (alist-get 'whitespace-cleanup-mode minor-mode-alist) '("")))
 
+(with-eval-after-load 'outline
+  (setf (alist-get 'outline-minor-mode minor-mode-alist) '("")))
+
 ;;; Track currency exchange rates
 
 (defvar esy/eur-to-ils-rates nil)
@@ -1352,23 +1355,29 @@ as the initial input for completion, and return that directory."
 (defvar esy/mode-line-format
   '(" %+ "
     mode-line-buffer-identification
-    " (%[" mode-name mode-line-process minor-mode-alist "%])"
+    " (%[" mode-name mode-line-process minor-mode-alist "%n%])"
     (vc-mode vc-mode)
     mode-line-format-right-align
-    "%l:%c "
-    (-3 "%p")
-    " "
     (:eval (when (mode-line-window-selected-p)
-             (let* ((last-rate (cdar esy/eur-to-ils-rates))
-                    (prev-rate (cdadr esy/eur-to-ils-rates))
-                    (face-arrw (cond
-                                ((< prev-rate last-rate) '("↑" . 'error))
-                                ((< last-rate prev-rate) '("↓" . 'success))
-                                (t                       '("→" . 'warning))))
-                    (arrw (car face-arrw))
-                    (face (cdr face-arrw)))
-               (propertize (concat "€" arrw (number-to-string last-rate) "₪ ") 'face face))))
-    display-time-string battery-mode-line-string))
+             (list
+              (let* ((last-rate (cdar esy/eur-to-ils-rates))
+                     (prev-rate (cdadr esy/eur-to-ils-rates))
+                     (face-arrw (cond
+                                 ((< prev-rate last-rate) '("↑" . error))
+                                 ((< last-rate prev-rate) '("↓" . success))
+                                 (t                       '("→" . warning))))
+                     (arrw (car face-arrw))
+                     (face (cdr face-arrw)))
+                (propertize (concat "€" arrw (number-to-string last-rate) "₪")
+                            'face face))
+              " "
+              'display-time-string
+              'battery-mode-line-string)))
+    "%5l"
+    (4 "|%c")
+    " "
+    (-3 "%p")
+    "/%I "))
 
 (add-hook 'after-init-hook
           (lambda ()