From d7a4d6fc39f0716830ac089a9b5960ba84e0f99e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 16 Dec 2017 23:45:06 -0500 Subject: [PATCH] private/hlissner: minor refactor --- modules/private/hlissner/config.el | 39 ++++++++++++++++++++---------- modules/private/hlissner/init.el | 29 +++++++++++----------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/modules/private/hlissner/config.el b/modules/private/hlissner/config.el index 0b9ed8cbc..b034ad8c9 100644 --- a/modules/private/hlissner/config.el +++ b/modules/private/hlissner/config.el @@ -8,6 +8,11 @@ (load! +bindings) ; my key bindings (load! +commands)) ; my custom ex commands + +;; +;; Global config +;; + (setq epa-file-encrypt-to user-mail-address auth-sources (list (expand-file-name ".authinfo.gpg" +hlissner-dir)) +doom-modeline-buffer-file-name-style 'relative-from-project) @@ -18,8 +23,13 @@ (apply orig-fn args))) (advice-add #'tramp-read-passwd :around #'+hlissner*no-authinfo-for-tramp) + +;; +;; Modules +;; + (after! smartparens - ;; Auto-close more conservatively + ;; Auto-close more conservatively and expand braces on RET (let ((unless-list '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p))) @@ -34,18 +44,31 @@ ;; feature/evil (after! evil-mc - ;; if I'm in insert mode, chances are I want cursors to resume + ;; Make evil-mc resume its cursors when I switch to insert mode (add-hook! 'evil-mc-before-cursors-created (add-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors nil t)) (add-hook! 'evil-mc-after-cursors-deleted (remove-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors t))) -;; Don't use default snippets, use mine. +;; feature/snippets (after! yasnippet + ;; Don't use default snippets, use mine. (setq yas-snippet-dirs (append (list '+hlissner-snippets-dir) (delq 'yas-installed-snippets-dir yas-snippet-dirs)))) +;; completion/helm +(after! helm + ;; Hide header lines in helm. I don't like them + (set-face-attribute 'helm-source-header nil :height 0.1)) + +;; lang/org +(after! org-bullets + ;; The standard unicode characters are usually misaligned depending on the + ;; font. This bugs me. Personally, markdown #-marks for headlines are more + ;; elegant, so we use those. + (setq org-bullets-bullet-list '("#"))) + ;; app/irc (after! circe (setq +irc-notifications-watch-strings '("v0" "vnought" "hlissner")) @@ -83,13 +106,3 @@ (user-mail-address . "henrik@lissner.net") (mu4e-compose-signature . "---\nHenrik Lissner")) t)) - -;; The standard unicode characters are usually misaligned depending on the font. -;; This bugs me. Personally, markdown #-marks for headlines are more elegant, so -;; we use those. -(after! org-bullets - (setq org-bullets-bullet-list '("#"))) - -;; Hide header lines in helm. I don't like them -(after! helm - (set-face-attribute 'helm-source-header nil :height 0.1)) diff --git a/modules/private/hlissner/init.el b/modules/private/hlissner/init.el index 0218730cf..37eb5c43a 100644 --- a/modules/private/hlissner/init.el +++ b/modules/private/hlissner/init.el @@ -14,7 +14,9 @@ (setq doom-big-font (font-spec :family "Fira Mono" :size 19)) (pcase (system-name) - ((or "halimede" "proteus") + ("proteus" + ;; My 13" laptop has very little screen estate, so we use a bitmap font + ;; there. For Doom, that means we need to take up less space! (setq-default line-spacing 1) (setq doom-font (font-spec :family "kakwa kakwafont" :size 12) @@ -22,32 +24,29 @@ doom-unicode-font (font-spec :family "UT Ttyp0") ;; ui/doom-modeline +doom-modeline-height 23 - +doom-modeline-bar-width 1 ;; `doom-themes' doom-neotree-enable-variable-pitch nil doom-neotree-project-size 1.2 doom-neotree-line-spacing 0 doom-neotree-folder-size 1.0 - doom-neotree-chevron-size 0.6 - org-ellipsis "  ") - - (custom-set-faces - '(doom-modeline-bar ((t (:background nil))))) - + doom-neotree-chevron-size 0.6) (add-hook! doom-big-font-mode - (setq +doom-modeline-height (if doom-big-font-mode 37 23)))) + (setq +doom-modeline-height (if doom-big-font-mode 37 23))) + + ;; No highlighted bar in the mode-line + (setq +doom-modeline-bar-width 1) + (custom-set-faces '(doom-modeline-bar ((t (:background nil)))))) (_ + ;; Everywhere else, I have big displays and plenty of space, so use it! (setq doom-font (font-spec :family "Fira Mono" :size 12) doom-variable-pitch-font (font-spec :family "Fira Sans") - doom-unicode-font (font-spec :family "DejaVu Sans Mono")) + doom-unicode-font (font-spec :family "DejaVu Sans Mono") + org-ellipsis "  ") - ;; Since Fira Mono doesn't have an italicized variant, highlight it instead + ;; Fira Mono doesn't have italics, so we highlight it instead. (add-hook! doom-post-init - (set-face-attribute 'italic nil - :weight 'ultra-light - :foreground "#ffffff" - :background (doom-color 'current-line))) + (set-face-attribute 'italic nil :weight 'ultra-light :foreground "#ffffff")) (add-hook! doom-big-font-mode (setq +doom-modeline-height (if doom-big-font-mode 37 29)))))