(Emacs/config)~Fix up some stuff in mode line

This commit is contained in:
2024-07-02 00:55:48 +01:00
parent b50d05e5a9
commit e2dba6be76
2 changed files with 17 additions and 17 deletions

View File

@@ -27,18 +27,6 @@
;;; Code:
(defun +better-mode-line/evil-state ()
"Returns either the empty string if no evil-state is defined or
the first character of the evil state capitalised"
(with-eval-after-load "evil"
(if (bound-and-true-p evil-state)
(upcase
(substring
(format "%s"
evil-state)
0 1))
"")))
(defvar +better-mode-line/left-segment nil
"List of elements that are placed on the left of the mode-line")
@@ -51,6 +39,18 @@ the first character of the evil state capitalised"
(defconst +better-mode-line/--minimum-padding 4
"Minimum size of padding string.")
(defun +better-mode-line/evil-state ()
"Returns either the empty string if no evil-state is defined or
the first character of the evil state capitalised"
(with-eval-after-load "evil"
(if (bound-and-true-p evil-state)
(upcase
(substring
(format "%s"
evil-state)
0 1))
"")))
(defun +better-mode-line/--get-padding-size (centre-size other-size)
(let* ((win-width (window-width))
(margins (window-margins))