From 8cd2e8df81f3c61395bd16f4f2c0e6de46c82f07 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 14 Apr 2022 03:28:23 +0100 Subject: themes: default face family and size --- init.org | 14 +++++--------- lib/themes/jao-light-theme.el | 3 ++- lib/themes/jao-themes.el | 10 +++++++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/init.org b/init.org index 1337e8f..c49e09b 100644 --- a/init.org +++ b/init.org @@ -377,9 +377,6 @@ (setq custom-theme-directory (expand-file-name "lib/themes" jao-emacs-dir)) - (defvar jao-default-font "Hack-9") ;; "Fira Code-9" - (setq jao-default-font "Roboto Mono-9") - (require 'jao-themes) (defvar jao-theme-dark 'jao-dark) @@ -387,7 +384,8 @@ (defun jao-themes-setup () (let ((dark (jao-colors-scheme-dark-p))) - (load-theme (if dark jao-theme-dark jao-theme-light) t))) + (load-theme (if dark jao-theme-dark jao-theme-light) t) + (modify-all-frames-parameters `((font . ,jao-themes-default-face))))) (when (and window-system (not (eq window-system 'pgtk))) (jao-themes-setup)) @@ -1232,17 +1230,15 @@ *** Frame geometry #+begin_src emacs-lisp (setq frame-resize-pixelwise nil) - ;;; modeline, toolbars and co. (modify-all-frames-parameters `((horizontal-scroll-bars . nil) (vertical-scroll-bars . nil) (scroll-bar-width . 11) - (menu-bar . nil) - (font . ,jao-default-font))) + (menu-bar . nil))) #+end_src *** Frame layout, title, etc. - #+BEGIN_SRC emacs-lisp + #+begin_src emacs-lisp (setq frame-title-format '("%b")) (use-package fringe) (fringe-mode) @@ -1276,7 +1272,7 @@ (jao-trisect t) (next-window) (delete-window)) - #+END_SRC + #+end_src *** afio #+begin_src emacs-lisp (use-package jao-afio) diff --git a/lib/themes/jao-light-theme.el b/lib/themes/jao-light-theme.el index 81ff759..a96950e 100644 --- a/lib/themes/jao-light-theme.el +++ b/lib/themes/jao-light-theme.el @@ -41,7 +41,8 @@ (red "burlywood4") (blue "#023770") (green "#005555")) - (:face-family "Roboto Mono") + (:face-family "Fira Code") + (:face-size 9) (:bold-weight 'medium) (:palette (fg "black") (bg "white") diff --git a/lib/themes/jao-themes.el b/lib/themes/jao-themes.el index efc6a9f..cd8a0f0 100644 --- a/lib/themes/jao-themes.el +++ b/lib/themes/jao-themes.el @@ -21,7 +21,8 @@ (require 'ansi-color) ;;; palette -(defvar jao-themes--face-family "Inconsolata") +(defvar jao-themes-default-face "Hack-9") +(defvar jao-themes--face-family "Hack") (defvar jao-themes--fg "black") (defvar jao-themes--bg "white") (defvar jao-themes--box "grey75") @@ -1195,11 +1196,11 @@ (when jao-themes--fg (push (cons 'foreground-color jao-themes--fg) f-alist) (when (stringp jao-themes--fg) - (set-frame-parameter nil 'foreground-color jao-themes--fg))) + (set-frame-parameter nil 'foreground-color jao-themes--fg))) (when jao-themes--bg (push (cons 'background-color jao-themes--bg) f-alist) (when (stringp jao-themes--bg) - (set-frame-parameter nil 'background-color jao-themes--bg))) + (set-frame-parameter nil 'background-color jao-themes--bg))) (setq window-system-default-frame-alist (cons (cons kind f-alist) @@ -1210,11 +1211,14 @@ (x-faces (cdr (assoc :x-faces args))) (x-colors (cdr (assoc :x-colors args))) (family (cadr (assoc :face-family args))) + (size (or (cadr (assoc :face-size args)) 9)) (bw (or (cadr (assoc :bold-weight args)) jao-themes--bold-weight))) `(progn (custom-make-theme-feature ',name) (deftheme ,name) (custom-theme-set-variables ',name + '(jao-themes-default-face + (format "%s-%s" ,family ,size)) '(jao-themes--face-family ,family) '(jao-themes--bold-weight ,bw)) (let ((*jao-themes--color-names* ',(cdr (assoc :names args))) -- cgit v1.2.3