aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules/bard-emacs-modeline.el
blob: 8d4d04e6f86b574e54ae933988d5b31cf94f348d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(require 'bard-modeline)

;;; Mode line
(setq mode-line-compact nil) ; Emacs 28
(setq mode-line-right-align-edge 'right-margin)
(setq-default mode-line-format
              '("%e"
                prot-modeline-kbd-macro
                prot-modeline-narrow
                bard-modeline-centered-cursor
                prot-modeline-input-method
                bard-modeline-ryo-modal-insert
                bard-modeline-ryo-modal-normal
                prot-modeline-buffer-status
                prot-modeline-window-dedicated-status
                " "
                prot-modeline-buffer-identification
                "  "
                prot-modeline-major-mode
                prot-modeline-process
                "  "
                prot-modeline-vc-branch
                "  "
                prot-modeline-flymake
                prot-modeline-eglot
                "  "
                mode-line-format-right-align
                prot-modeline-notmuch-indicator
                " "
                prot-modeline-misc-info))

(with-eval-after-load 'spacious-padding
  (defun prot/modeline-spacious-indicators ()
    "Set box attribute to `'prot-modeline-indicator-button' if spacious-padding is enabled."
    (if (bound-and-true-p spacious-padding-mode)
        (set-face-attribute 'prot-modeline-indicator-button nil :box t)
      (set-face-attribute 'prot-modeline-indicator-button nil :box 'unspecified)))

  ;; Run it at startup and then afterwards whenever
  ;; `spacious-padding-mode' is toggled on/off.
  (prot/modeline-spacious-indicators)

  (add-hook 'spacious-padding-mode-hook #'prot/modeline-spacious-indicators))

(setq mode-line-right-align-edge 'window)

(provide 'bard-emacs-modeline)

;;; bard-emacs-modeline.el ends here