From: Amin Bandali Date: Mon, 3 Dec 2018 14:05:38 +0000 (-0500) Subject: [emacs] switch from smart-mode-line to doom-{modeline,themes} X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/commitdiff_plain/4b4c2c1dcdd5b5dee2cb6265f17914d4581a09ef [emacs] switch from smart-mode-line to doom-{modeline,themes} doom-tomorrow-night is great and quite easy on the eyes also, kudos and many thanks to Carlos Pita for his numerous useful tips and enhancements for Org mode + doom-tomorrow-night --- diff --git a/.gitmodules b/.gitmodules index bbf0f16..06680e6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "alert"] path = lib/alert url = git@github.com:jwiegley/alert.git +[submodule "all-the-icons"] + path = lib/all-the-icons + url = git@github.com:domtronn/all-the-icons.el.git [submodule "alloy-mode"] path = lib/alloy-mode url = git@github.com:dwwmmn/alloy-mode.git @@ -58,6 +61,12 @@ [submodule "diff-hl"] path = lib/diff-hl url = git@github.com:dgutov/diff-hl.git +[submodule "doom-modeline"] + path = lib/doom-modeline + url = git@github.com:seagle0128/doom-modeline.git +[submodule "doom-themes"] + path = lib/doom-themes + url = git@github.com:hlissner/emacs-doom-themes.git [submodule "ebdb"] path = lib/ebdb url = git@github.com:emacsmirror/ebdb.git @@ -277,9 +286,6 @@ [submodule "slack"] path = lib/slack url = git@github.com:yuya373/emacs-slack.git -[submodule "smart-mode-line"] - path = lib/smart-mode-line - url = git@github.com:Malabarba/smart-mode-line.git [submodule "smex"] # used by counsel-M-x path = lib/smex url = git@github.com:nonsequitur/smex.git diff --git a/etc/custom.el b/etc/custom.el index ca23ad5..be0ffab 100644 --- a/etc/custom.el +++ b/etc/custom.el @@ -60,21 +60,21 @@ [//]: # \"Exported with love from a post written in Org mode\" [//]: # \"- https://ox-hugo.scripter.co\"") - (eval add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local)))) + (eval add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local))) + '(unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$"))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(dired-directory ((t (:weight semi-bold)))) - '(font-lock-comment-face ((t (:foreground "#111111" :weight semi-bold)))) - '(ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold)))) - '(ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold)))) - '(ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold)))) + ;; '(font-lock-comment-face ((t (:foreground "grey" :weight semi-bold)))) + ;; '(ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold)))) + ;; '(ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold)))) + ;; '(ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold)))) '(magit-diff-file-heading ((t (:weight normal)))) - '(message-header-cc ((t (:foreground "#333" :weight normal)))) - '(message-header-subject ((t (:foreground "navy blue" :weight semi-bold)))) - '(message-header-to ((t (:foreground "MidnightBlue" :weight semi-bold)))) - '(notmuch-search-unread-face ((t (:weight semi-bold)))) - '(notmuch-tag-face ((t (:foreground "navy blue" :weight semi-bold)))) + ;; '(message-header-cc ((t (:foreground "#333" :weight normal)))) + ;; '(message-header-subject ((t (:foreground "navy blue" :weight semi-bold)))) + ;; '(message-header-to ((t (:foreground "MidnightBlue" :weight semi-bold)))) + '(quote (org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21"))))) '(widget-button ((t (:weight semi-bold))))) diff --git a/init.org b/init.org index 5c24b9e..cdc5ca2 100644 --- a/init.org +++ b/init.org @@ -867,6 +867,7 @@ In short, my favourite way of life. org-src-preserve-indentation nil org-edit-src-content-indentation 0 org-email-link-description-format "Email %c: %s" ; %.30s + org-highlight-latex-and-related '(entities) org-log-done 'time) (add-to-list 'org-structure-template-alist '("L" . "src emacs-lisp") t) (after! org-src @@ -880,12 +881,23 @@ In short, my favourite way of life. (org-edit-src-save) (org-edit-src-exit))) (define-key org-src-mode-map [remap evil-quit] 'org-edit-src-abort)) + (font-lock-add-keywords + 'org-mode + '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)" + (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive + (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind + (4 '(:foreground "#c5c8c6") t))) ; title + t) :bind (:map org-mode-map ("M-L" . org-insert-last-stored-link)) :hook ((org-mode . org-indent-mode) (org-mode . auto-fill-mode) (org-mode . flyspell-mode)) :custom - (org-latex-packages-alist '(("" "listings") ("" "color")))) + (org-latex-packages-alist '(("" "listings") ("" "color"))) + :custom-face + '(org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21")))) + '(org-block ((t (:background "#1d1f21")))) + '(org-latex-and-related ((t (:foreground "#b294bb"))))) (use-package ox-latex :after ox @@ -1018,10 +1030,11 @@ There's no way I could top that, so I won't attempt to. :config (setq ivy-wrap t) (ivy-mode 1) - :custom-face - (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold)))) - (ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold)))) - (ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold))))) + ;; :custom-face + ;; (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold)))) + ;; (ivy-minibuffer-match-face-3 ((t (:background "#bbbbff" :weight semi-bold)))) + ;; (ivy-minibuffer-match-face-4 ((t (:background "#ffbbff" :weight semi-bold)))) +) #+end_src **** Swiper @@ -1704,7 +1717,7 @@ Emacs package that displays available keybindings in popup (load-theme 'tangomod t) #+end_src -** [[https://github.com/Malabarba/smart-mode-line][smart-mode-line]] +** COMMENT [[https://github.com/Malabarba/smart-mode-line][smart-mode-line]] #+begin_src emacs-lisp (use-package smart-mode-line @@ -1714,29 +1727,42 @@ Emacs package that displays available keybindings in popup (remove-hook 'display-time-hook 'sml/propertize-time-string)) #+end_src +** doom-modeline + +#+begin_src emacs-lisp +(use-package doom-modeline + :demand t + :config (setq doom-modeline-height 32) + :hook (after-init . doom-modeline-init)) +#+end_src + +** doom-themes + +#+begin_src emacs-lisp +(use-package doom-themes) +#+end_src + ** theme helper functions #+begin_src emacs-lisp -(defun amin/light () - "Load light theme(s)." +(defun amin/lights-on () + "Enable my favourite light theme." (interactive) (progn (mapc #'disable-theme custom-enabled-themes) - (load-theme 'tangomod t) - (sml/apply-theme 'light))) + (load-theme 'tangomod t))) -(defun amin/dark () - "Load dark theme(s)." +(defun amin/lights-off () + "Go dark." (interactive) (progn (mapc #'disable-theme custom-enabled-themes) - (load-theme 'tangomod-dark t) - (sml/apply-theme 'dark))) + (load-theme 'doom-tomorrow-night t))) (amin--leader-keys "t" '(:ignore t :wk "theme") - "t d" 'amin/dark - "t l" 'amin/light) + "t d" 'amin/lights-off + "t l" 'amin/lights-on) #+end_src ** [[https://github.com/bbatsov/crux][crux]] @@ -2246,10 +2272,11 @@ For when I /have to/ use GH. (message-mode . flyspell-mode) (message-mode . (lambda () (setq fill-column 65 message-fill-column 65)))) - :custom-face - (message-header-subject ((t (:foreground "#111" :weight semi-bold)))) - (message-header-to ((t (:foreground "#111" :weight normal)))) - (message-header-cc ((t (:foreground "#333" :weight normal))))) + ;; :custom-face + ;; (message-header-subject ((t (:foreground "#111" :weight semi-bold)))) + ;; (message-header-to ((t (:foreground "#111" :weight normal)))) + ;; (message-header-cc ((t (:foreground "#333" :weight normal)))) + ) (after! mml-sec (setq mml-secure-openpgp-encrypt-to-self t diff --git a/lib/all-the-icons b/lib/all-the-icons new file mode 160000 index 0000000..52d1f2d --- /dev/null +++ b/lib/all-the-icons @@ -0,0 +1 @@ +Subproject commit 52d1f2d36468146c93aaf11399f581401a233306 diff --git a/lib/doom-modeline b/lib/doom-modeline new file mode 160000 index 0000000..da9fa3c --- /dev/null +++ b/lib/doom-modeline @@ -0,0 +1 @@ +Subproject commit da9fa3ced23a543f5a84fe589aa0b1f986e50a2f diff --git a/lib/doom-themes b/lib/doom-themes new file mode 160000 index 0000000..2aa163b --- /dev/null +++ b/lib/doom-themes @@ -0,0 +1 @@ +Subproject commit 2aa163b8322a55a69296552bc03b1b84413d5abc diff --git a/lib/smart-mode-line b/lib/smart-mode-line deleted file mode 160000 index b79f4fa..0000000 --- a/lib/smart-mode-line +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b79f4fa5f2380b0d726a895dd7199e5483004490