From 5a09d539ba16afd289b6e18c624217cc81938edd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Dec 2017 22:40:31 -0500 Subject: [PATCH] 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)) --- core/core-ui.el | 42 ++++------------------- modules/private/hlissner/init.el | 57 +++++++++++++++++++++----------- modules/ui/doom/config.el | 2 +- 3 files changed, 44 insertions(+), 57 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index d068b2a27..9bff3bf94 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -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 diff --git a/modules/private/hlissner/init.el b/modules/private/hlissner/init.el index caf5a33fc..3f6bed82a 100644 --- a/modules/private/hlissner/init.el +++ b/modules/private/hlissner/init.el @@ -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))))) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 2493c8959..0d8aa8858 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -3,7 +3,7 @@ ;; (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 ()