Cleanup the modeline

master
Jacopo De Simoi 8 years ago
parent e34d219865
commit e26fa8125d
  1. 1
      custom.el
  2. 40
      global.org

@ -28,6 +28,7 @@
'(font-latex-fontify-sectioning (quote color))
'(font-latex-match-textual-keywords (quote (("todo" "[{"))))
'(frame-background-mode (quote dark))
'(global-disable-mouse-mode-lighter "")
'(global-font-lock-mode t nil (font-lock))
'(helm-su-or-sudo "su")
'(hl-sexp-background-colors (quote ("#395959")))

@ -181,6 +181,46 @@
mode-line-modes
mode-line-misc-info
mode-line-end-spaces))
#+END_SRC
The following has been found in [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][here]] to clean up the modeline
#+BEGIN_SRC emacs-lisp
(defvar mode-line-cleaner-alist
`((auto-complete-mode . " α")
(yas/minor-mode . " υ")
(paredit-mode . " π")
(eldoc-mode . "")
(abbrev-mode . "")
(auto-fill-function . "")
(global-disable-mouse-mode . "")
;; Major modes
(lisp-interaction-mode . "λ |")
(hi-lock-mode . "")
(python-mode . "Py")
(emacs-lisp-mode . "EL |")
(org-mode . "Ω |")
(org-agenda-mode . "Ω:Agenda |"))
"Alist for `clean-mode-line'.
When you add a new element to the alist, keep in mind that you
must pass the correct minor/major mode symbol and a string you
want to use in the modeline *in lieu of* the original.")
(defun clean-mode-line ()
(interactive)
(loop for cleaner in mode-line-cleaner-alist
do (let* ((mode (car cleaner))
(mode-str (cdr cleaner))
(old-mode-str (cdr (assq mode minor-mode-alist))))
(when old-mode-str
(setcar old-mode-str mode-str))
;; major mode
(when (eq mode major-mode)
(setq mode-name mode-str)))))
(add-hook 'after-change-major-mode-hook 'clean-mode-line)
#+END_SRC
** Coding system
Prefer the utf-8 coding system globally. This helps with the issue of

Loading…
Cancel
Save