Breaking change: remove font and theme settings

I am removing settings for core configuration to reduce "magic" in Doom.
set! is meant for cross-configuring modules that may or may not be
enabled. There should be no such concern for configuring Doom core.

From now on, change your fonts with:

  (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-big-font (font-spec :family "Fira Mono" :size 19))
This commit is contained in:
Henrik Lissner 2017-12-08 22:40:31 -05:00
parent f063a08891
commit 5a09d539ba
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 44 additions and 57 deletions

View file

@ -7,16 +7,18 @@
"A symbol representing the color theme to load.")
(defvar doom-font nil
"The default font to use. Expects a FONT-SPEC (`font-spec').")
"The default font to use. Expects a `font-spec'.")
(defvar doom-big-font nil
"The default font to use. Expects a FONT-SPEC (`font-spec').")
"The default large font to use when `doom-big-font-mode' is enabled. Expects a
`font-spec'.")
(defvar doom-variable-pitch-font nil
"The default font to use for variable-pitch text. Expects a FONT-SPEC (`font-spec').")
"The default font to use for variable-pitch text. Expects a `font-spec'.")
(defvar doom-unicode-font nil
"Fallback font for unicode glyphs. Is ignored if :feature unicode is active.")
"Fallback font for unicode glyphs. Is ignored if :feature unicode is active.
Expects a `font-spec'.")
(defvar doom-major-mode-names
'((sh-mode . "sh")
@ -32,38 +34,6 @@ shorter major mode name in the mode-line. See `doom|set-mode-name'.")
`doom//reload-theme').")
;; Settings
(def-setting! :theme (theme)
"Sets the current THEME (a symbol)."
`(unless doom-theme
(setq doom-theme ,theme)))
(def-setting! :font (family &rest spec)
"Sets the default font (if one wasn't already set). FAMILY is the name of the
font, and SPEC is a `font-spec'."
`(unless doom-font
(setq doom-font (font-spec :family ,family ,@spec))))
(def-setting! :variable-pitch-font (family &rest spec)
"Sets the default font for the variable-pitch face and minor mode (if one
wasn't already set). FAMILY is the name of the font, and SPEC is a `font-spec'."
`(unless doom-variable-pitch-font
(setq doom-variable-pitch-font (font-spec :family ,family ,@spec))))
(def-setting! :big-font (family &rest spec)
"Sets the font to use for `doom-big-font-mode' (if one wasn't already set).
FAMILY is the name of the font, and SPEC is a `font-spec'."
`(unless doom-big-font
(setq doom-big-font (font-spec :family ,family ,@spec))))
(def-setting! :unicode-font (family &rest spec)
"Sets the font to use for unicode characters (if one wasn't already set).
FAMILY is the name of the font, and SPEC is a `font-spec'. This is ignored if
the ':ui unicode' module is enabled."
`(unless doom-unicode-font
(setq doom-unicode-font (font-spec :family ,family ,@spec))))
(setq-default
bidi-display-reordering nil ; disable bidirectional text for tiny performance boost
blink-matching-paren nil ; don't blink--too distracting

View file

@ -1,26 +1,43 @@
;;; private/hlissner/init.el -*- lexical-binding: t; -*-
;; I've swapped these keys on my keyboard
(setq x-super-keysym 'alt
x-alt-keysym 'meta
user-mail-address "henrik@lissner.net"
user-full-name "Henrik Lissner")
;; An extra measure to prevent the flash of unstyled mode-line while Emacs is
;; booting up (when Doom is byte-compiled).
(setq-default mode-line-format nil)
;; host-specific settings
(pcase (system-name)
;; ("triton")
((or "proteus" "halimede")
;; smaller screen, smaller fonts
(set! :font "Fira Mono" :size 10)
(set! :variable-font "Fira Sans" :size 10)
(set! :unicode-font "DejaVu Sans Mono" :size 10)
(setq +doom-modeline-height 25))
;; ("nereid")
;; ("io")
;; ("sao")
)
;; I've swapped these keys on my keyboard
(setq x-super-keysym 'alt
x-alt-keysym 'meta)
(setq user-mail-address "henrik@lissner.net"
user-full-name "Henrik Lissner")
(setq doom-big-font (font-spec :family "Fira Mono" :size 19))
(pcase system-name
((or "halimede" "proteus")
(setq-default line-spacing 1)
(setq doom-font (font-spec :family "kakwa kakwafont" :size 12)
doom-variable-pitch-font (font-spec :family "kakwa kakwafont")
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 "")
(add-hook! doom-big-font-mode
(setq +doom-modeline-height (if doom-big-font-mode 37 23))))
(_
(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"))
(add-hook! doom-big-font-mode
(setq +doom-modeline-height (if doom-big-font-mode 37 29)))))

View file

@ -3,7 +3,7 @@
;; <https://github.com/hlissner/emacs-doom-theme>
(def-package! doom-themes
:config
(set! :theme 'doom-one)
(unless doom-theme (setq doom-theme 'doom-one))
;; Ensure `doom/reload-load-path' reloads common faces
(defun +doom|reload-theme ()