From: Amin Bandali Date: Sat, 22 Dec 2018 06:06:13 +0000 (-0500) Subject: [emacs] switch from doom-modeline to smart-mode-line again X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/21ad71fa7e98449ed407035a632dc3199a355e22 [emacs] switch from doom-modeline to smart-mode-line again --- diff --git a/.gitmodules b/.gitmodules index 8bf2436..4617b94 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,9 +55,6 @@ [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 @@ -248,6 +245,9 @@ [submodule "shut-up"] path = lib/shut-up url = git@github.com:cask/shut-up.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/init.org b/init.org index d7af98c..ae1a6e6 100644 --- a/init.org +++ b/init.org @@ -345,14 +345,12 @@ in my shell. (exec-path-from-shell-copy-env "SSH_AUTH_SOCK")) #+end_src -** Only one custom theme at a time +** COMMENT Only one custom theme at a time #+begin_src emacs-lisp -;; only one custom theme at a time -;; -;; (defadvice load-theme (before clear-previous-themes activate) -;; "Clear existing theme settings instead of layering them" -;; (mapc #'disable-theme custom-enabled-themes)) +(defadvice load-theme (before clear-previous-themes activate) + "Clear existing theme settings instead of layering them" + (mapc #'disable-theme custom-enabled-themes)) #+end_src ** Server @@ -371,44 +369,42 @@ See [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.htm :config (or (server-running-p) (server-mode))) #+end_src -** Unicode support +** COMMENT Unicode support Font stack with better unicode support, around =Ubuntu Mono= and =Hack=. #+begin_src emacs-lisp -;; unicode support -;; -;; (dolist (ft (fontset-list)) -;; (set-fontset-font -;; ft -;; 'unicode -;; (font-spec :name "Source Code Pro" :size 14)) -;; (set-fontset-font -;; ft -;; 'unicode -;; (font-spec :name "DejaVu Sans Mono") -;; nil -;; 'append) -;; ;; (set-fontset-font -;; ;; ft -;; ;; 'unicode -;; ;; (font-spec -;; ;; :name "Symbola monospacified for DejaVu Sans Mono") -;; ;; nil -;; ;; 'append) -;; ;; (set-fontset-font -;; ;; ft -;; ;; #x2115 ; ℕ -;; ;; (font-spec :name "DejaVu Sans Mono") -;; ;; nil -;; ;; 'append) -;; (set-fontset-font -;; ft -;; (cons ?Α ?ω) -;; (font-spec :name "DejaVu Sans Mono" :size 14) -;; nil -;; 'prepend)) +(dolist (ft (fontset-list)) + (set-fontset-font + ft + 'unicode + (font-spec :name "Source Code Pro" :size 14)) + (set-fontset-font + ft + 'unicode + (font-spec :name "DejaVu Sans Mono") + nil + 'append) + ;; (set-fontset-font + ;; ft + ;; 'unicode + ;; (font-spec + ;; :name "Symbola monospacified for DejaVu Sans Mono") + ;; nil + ;; 'append) + ;; (set-fontset-font + ;; ft + ;; #x2115 ; ℕ + ;; (font-spec :name "DejaVu Sans Mono") + ;; nil + ;; 'append) + (set-fontset-font + ft + (cons ?Α ?ω) + (font-spec :name "DejaVu Sans Mono" :size 14) + nil + 'prepend)) #+end_src ** Gentler font resizing @@ -1586,13 +1582,12 @@ Emacs package that displays available keybindings in popup (load-theme 'tangomod t) #+end_src -** doom-modeline +** smart-mode-line #+begin_src emacs-lisp -(use-package doom-modeline - :demand t - :config (setq doom-modeline-height 32) - :hook (after-init . doom-modeline-init)) +(use-package smart-mode-line + :config + (sml/setup)) #+end_src ** doom-themes @@ -1607,16 +1602,16 @@ Emacs package that displays available keybindings in popup (defun amin/lights-on () "Enable my favourite light theme." (interactive) - (progn - (mapc #'disable-theme custom-enabled-themes) - (load-theme 'tangomod t))) + (mapc #'disable-theme custom-enabled-themes) + (load-theme 'tangomod t) + (sml/apply-theme 'automatic)) (defun amin/lights-off () "Go dark." (interactive) - (progn - (mapc #'disable-theme custom-enabled-themes) - (load-theme 'doom-tomorrow-night t))) + (mapc #'disable-theme custom-enabled-themes) + (load-theme 'doom-tomorrow-night t) + (sml/apply-theme 'automatic)) (bind-keys ("s-t d" . amin/lights-off) diff --git a/lib/doom-modeline b/lib/doom-modeline deleted file mode 160000 index 65ea32f..0000000 --- a/lib/doom-modeline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 65ea32f20debdfc18dc709d187b498f0eed94341 diff --git a/lib/smart-mode-line b/lib/smart-mode-line new file mode 160000 index 0000000..b79f4fa --- /dev/null +++ b/lib/smart-mode-line @@ -0,0 +1 @@ +Subproject commit b79f4fa5f2380b0d726a895dd7199e5483004490