diff --git a/custom.el b/custom.el index 16cc488..75c29b9 100644 --- a/custom.el +++ b/custom.el @@ -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"))) diff --git a/global.org b/global.org index d220d9e..16fce6a 100644 --- a/global.org +++ b/global.org @@ -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