-
Notifications
You must be signed in to change notification settings - Fork 1
/
my-modeline.el
102 lines (94 loc) · 3.19 KB
/
my-modeline.el
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
;;; my-modeline --- Modeline stuff
;;
;; Copyright (C) 2014 Alex Bennée
;;
;; Author: Alex Bennée <[email protected]>
;;
;; This file is not part of GNU Emacs.
;;
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;;; Commentary:
;;
;; Split from my-display
;;
;;; Code:
(require 'use-package)
(require 'my-tracking)
;; override mood-line's default squashing of faces
(defun my-mood-line-segment-misc-info ()
"Return the current value of `mode-line-misc-info'."
(let ((misc-info (format-mode-line mode-line-misc-info)))
(unless (string-blank-p misc-info)
(propertize (string-trim misc-info)))))
(use-package mood-line
:ensure t
:config (mood-line-mode)
:custom
(mood-line-glyph-alist mood-line-glyphs-unicode)
(mood-line-format '((" "
(mood-line-segment-modal)
" "
(or
(mood-line-segment-buffer-status)
(mood-line-segment-client)
" ")
" "
(mood-line-segment-project)
"/"
(mood-line-segment-buffer-name)
" "
(mood-line-segment-anzu)
" "
(mood-line-segment-multiple-cursors)
" "
(mood-line-segment-cursor-position)
""
#(":" 0 1
(face mood-line-unimportant))
(mood-line-segment-cursor-point)
" "
(mood-line-segment-region)
" "
(mood-line-segment-scroll)
"")
((mood-line-segment-indentation)
" "
(mood-line-segment-eol)
" "
(mood-line-segment-encoding)
" "
(mood-line-segment-vc)
" "
(mood-line-segment-major-mode)
" "
(my-mood-line-segment-misc-info)
" "
(mood-line-segment-checker)
" "
(mood-line-segment-process)
" " " "))))
(use-package diminish
:commands diminish
:init
(progn
(diminish 'auto-fill-function "Fl")
(diminish 'abbrev-mode "Ab")))
;; (display-time) is needed for appt to display in the mode-line, but
;; we don't want the time taking up precious space.
(use-package time
:commands display-time-mode
:init (display-time-mode)
:config
(setq display-time-interval 20
display-time-format 'nil
display-time-string-forms '( 24-hours ":" minutes )))
;; Displays current function() in programming modes.
(use-package which-func
:commands which-function-mode
:init (which-function-mode))
(provide 'my-modeline)
;;; my-modeline.el ends here