summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-11-15 07:47:50 -0800
committerFranck Cuny <franck@fcuny.net>2022-11-15 07:47:50 -0800
commitdeca37a94109f75e4b4db3813b4067ba290d7840 (patch)
tree0685d6e369edf262cf34aba89688d4dabb71b8bf
parentfix(completion): follow the documentation for eshell integration (diff)
downloademacs.d-deca37a94109f75e4b4db3813b4067ba290d7840.tar.gz
ref(ui): use a theme with nice colors and better font
The ef-themes are similar to modus, but they have a nicer background
color, which is less aggressive than plain white.

Switch to iosevka for the font, it's a bit nicer to my taste.

Change-Id: I21d482b9530f7d1106937d7e97261856ec8c5e61
-rw-r--r--emacs/custom/my-packages.el3
-rw-r--r--emacs/custom/my-ui.el52
2 files changed, 51 insertions, 4 deletions
diff --git a/emacs/custom/my-packages.el b/emacs/custom/my-packages.el
index da5263b..87d15d9 100644
--- a/emacs/custom/my-packages.el
+++ b/emacs/custom/my-packages.el
@@ -7,6 +7,9 @@
 
 (require 'straight)
 
+;; packages related to themes
+(straight-use-package 'ef-themes)
+
 ;; packages needed for LSP
 (straight-use-package 'eglot)
 
diff --git a/emacs/custom/my-ui.el b/emacs/custom/my-ui.el
index 6076c3f..9dc0802 100644
--- a/emacs/custom/my-ui.el
+++ b/emacs/custom/my-ui.el
@@ -21,15 +21,59 @@
     (setq mac-allow-anti-aliasing t)))
 
 (when (memq window-system '(x pgtk))
-  ;; if using `set-frame-font`, when opening a new frame with
-  ;; emacsclient, the font will not be used. Instead, use
-  ;; `default-frame-alist` to have the same font with emacsclient.
-  (add-to-list 'default-frame-alist '(font . "Source Code Pro-11"))
+  (set-face-attribute 'default nil :font "Iosevka Term Extended" :height 130)
+  (set-face-attribute 'variable-pitch nil :font "Iosevka Etoile" :height 130)
   ;; this is a fall back in the case we have Unicode characters.
   ;; For example, with this settings, the following source is
   ;; rendered correctly 😇 😀 and 🤢
   (set-fontset-font t 'symbol "Noto Color Emoji" nil 'append))
 
+;; Load a custom theme
+(eval-and-compile
+  (require 'modus-themes nil t)
+  (setq modus-themes-syntax '(faint)
+        modus-themes-links '(bold)
+        modus-themes-fringes '(intense)
+        modus-themes-markup '(bold intense background)
+        modus-themes-italic-constructs t
+        modus-themes-lang-checkers '(background)
+        modus-themes-org-blocks 'gray-background
+        modus-themes-headings '((1 . (background 1))
+                                (2 . (rainbow semibold 1))
+                                (t . (bold)))
+        modus-themes-completions '((matches   . (extrabold intense))
+                                   (selection . (semibold  intense))
+                                   (popup     . (extrabold intense)))
+        modus-themes-operandi-color-overrides '((bg-main . "#f2efe4"))))
+
+(eval-and-compile
+  (require 'ef-themes)
+  (setq ef-themes-to-toggle '(ef-duo-light ef-duo-dark))
+  ;; set the typeface for headers
+  (setq ef-themes-headings
+      '((0 . (variable-pitch bold 1.4))
+        (1 . (variable-pitch bold 1.3))
+        (2 . (variable-pitch regular 1.2))
+        (3 . (variable-pitch italic 1.1))
+        (t . (variable-pitch 1.1))))
+
+  ;; enable using variable pitch fonts for some part of the UI
+  (setq ef-themes-mixed-fonts t
+        ef-themes-variable-pitch-ui t)
+
+  ;; Read the doc string or manual for this one.  The symbols can be
+  ;; combined in any order.
+  (setq ef-themes-region '(intense no-extend neutral))
+
+  ;; Disable all other themes to avoid awkward blending:
+  (mapc #'disable-theme custom-enabled-themes)
+
+  ;; Load the theme of choice:
+  (load-theme 'ef-duo-light :no-confirm)
+
+  ;; OR use this to load the theme which also calls `ef-themes-post-load-hook':
+  (ef-themes-select 'ef-duo-light))
+
 (customize-set-variable 'display-time-24hr-format t)
 (customize-set-variable 'display-time-day-and-date t)
 (customize-set-variable 'display-time-format "%a %e %b, %H:%M")