X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/1b93c5be9d8a530d837fe680b33772f1968c248b..de0455a9112b567b48e58c216014cb65e99bd872:/init.org?ds=sidebyside diff --git a/init.org b/init.org index 5c24b9e..a8dddd0 100644 --- a/init.org +++ b/init.org @@ -76,7 +76,7 @@ file. ** License #+begin_src emacs-lisp :comments none -;; Copyright (C) 2018 Amin Bandali +;; Copyright (C) 2018 Amin Bandali ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -191,7 +191,7 @@ but for now I've decided to keep them enabled. See documentation for #+begin_src emacs-lisp (setq user-full-name "Amin Bandali" - user-mail-address "amin@aminb.org") + user-mail-address "amin@bandali.me") #+end_src ** Package management @@ -720,7 +720,8 @@ customizing it. (evil-mode 1) (general-swap-key nil '(normal motion) ";" ":") - (setq evil-want-visual-char-semi-exclusive t) + (setq evil-want-visual-char-semi-exclusive t + evil-cross-lines t) ;; custom mode state mappings (dolist (mspair '((ebdb-mode . emacs) @@ -867,6 +868,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 +882,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 +1031,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 @@ -1076,11 +1090,18 @@ There's no way I could top that, so I won't attempt to. (eshell-send-input)) (defun amin|eshell-setup () + (make-local-variable 'company-idle-delay) + (setq company-idle-delay nil) (bind-keys :map eshell-mode-map - ("C-d" . amin/eshell-quit-or-delete-char) - ("C-l" . amin/eshell-clear))) + ("C-d" . amin/eshell-quit-or-delete-char) + ("C-S-l" . amin/eshell-clear) + ("M-r" . counsel-esh-history) + ([tab] . company-complete))) - :hook (eshell-mode . amin|eshell-setup)) + :hook (eshell-mode . amin|eshell-setup) + :custom + (eshell-hist-ignoredups t) + (eshell-input-filter 'eshell-input-filter-initial-space)) #+end_src *** Ibuffer @@ -1271,7 +1292,6 @@ TODO: break this giant source block down into individual org sections. ([tab] . company-complete-common-or-cycle) ([escape] . company-abort)) :custom - (company-idle-delay 0.3) (company-minimum-prefix-length 1) (company-selection-wrap-around t) (company-dabbrev-char-regexp "\\sw\\|\\s_\\|[-_]") @@ -1704,7 +1724,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 +1734,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]] @@ -1866,6 +1899,7 @@ Make =*scratch*= and =*Messages*= unkillable. :config (unkillable-scratch 1) :custom + (unkillable-scratch-behavior 'do-nothing) (unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$"))) #+end_src @@ -2183,7 +2217,7 @@ For when I /have to/ use GH. :config (setq gnus-posting-styles '((".*" - (address "amin@aminb.org") + (address "amin@bandali.me") (body "\nBest,\namin\n")) ("gnu.*" (address "bandali@gnu.org")) @@ -2240,16 +2274,17 @@ For when I /have to/ use GH. message-send-mail-function 'message-send-mail-with-sendmail message-sendmail-envelope-from 'header message-dont-reply-to-names - "\\(\\(.*@aminb\\.org\\)\\|\\(\\(aminb?\\|mab\\|bandali\\)@gnu\\.org\\)\\|\\(\\(m\\|a\\(min\\.\\)?\\)bandali@uwaterloo\\.ca\\)\\)" + "\\(\\(amin@bandali\\.me\\)\\|\\(.*@aminb\\.org\\)\\|\\(\\(aminb?\\|mab\\|bandali\\)@gnu\\.org\\)\\|\\(\\(m\\|a\\(min\\.\\)?\\)bandali@uwaterloo\\.ca\\)\\)" message-user-fqdn "aminb.org") :hook (;; (message-setup . mml-secure-message-sign-pgpmime) (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