Setup individual fonts

This commit is contained in:
Eduardo Cueto-Mendoza 2024-04-17 19:34:26 +01:00
parent 6022f05549
commit 128eb00299
2 changed files with 102 additions and 24 deletions

View File

@ -242,13 +242,13 @@ I am using the [[https://github.com/tonsky/FiraCode][Fira Code]] and [[https://f
) )
((eq system-type 'gnu/linux) ((eq system-type 'gnu/linux)
;; Linux-specific code goes here. ;; Linux-specific code goes here.
(set-face-attribute 'default nil :font "Comic Code Regular" :height efs/default-font-size) (set-face-attribute 'default nil :font "Comic Code" :height efs/default-font-size)
;; Set the fixed pitch face ;; Set the fixed pitch face
(set-face-attribute 'fixed-pitch nil :font "Comic Code Regular" :height efs/default-font-size) (set-face-attribute 'fixed-pitch nil :font "Comic Code" :height efs/default-font-size)
;; Set the variable pitch face ;; Set the variable pitch face
(set-face-attribute 'variable-pitch nil :font "Comic Code Regular" :height efs/default-variable-font-size :weight 'regular) (set-face-attribute 'variable-pitch nil :font "Comic Code" :height efs/default-variable-font-size :weight 'regular)
) )
((eq system-type 'berkeley-unix) ((eq system-type 'berkeley-unix)
;; BSD-specific code goes here. ;; BSD-specific code goes here.
@ -579,7 +579,7 @@ The =efs/org-font-setup= function configures various text faces to tweak the siz
) )
((eq system-type 'gnu/linux) ((eq system-type 'gnu/linux)
;; Linux-specific code goes here. ;; Linux-specific code goes here.
(set-face-attribute (car face) nil :font "Comic Code Regular" :weight 'regular :height (cdr face)) (set-face-attribute (car face) nil :font "Comic Code" :weight 'regular :height (cdr face))
) )
((eq system-type 'berkeley-unix) ((eq system-type 'berkeley-unix)
;; BSD-specific code goes here. ;; BSD-specific code goes here.
@ -1435,7 +1435,15 @@ Dired is a built-in file manager for Emacs that does some pretty amazing things!
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq insert-directory-program "gls" dired-use-ls-dired t) (cond ((eq system-type 'darwin)
;; mac-specific code goes here.
(setq insert-directory-program "gls" dired-use-ls-dired t)
)
((eq system-type 'berkeley-unix)
;; BSD-specific code goes here.
(setq insert-directory-program "gls" dired-use-ls-dired t)
)
)
(use-package dired (use-package dired
:ensure nil :ensure nil
:commands (dired dired-jump) :commands (dired dired-jump)
@ -1478,7 +1486,7 @@ Dired is a built-in file manager for Emacs that does some pretty amazing things!
(use-package mu4e (use-package mu4e
:ensure nil :ensure nil
;:if (eq system-type 'darwin) :if (eq system-type 'darwin)
:load-path "/opt/homebrew/share/emacs/site-lisp/mu4e" :load-path "/opt/homebrew/share/emacs/site-lisp/mu4e"
;:defer 20 ; Wait until 20 seconds after startup ;:defer 20 ; Wait until 20 seconds after startup
;:defer t ;:defer t
@ -1511,13 +1519,44 @@ Dired is a built-in file manager for Emacs that does some pretty amazing things!
("/Archive" . ?a) ("/Archive" . ?a)
)) ))
;; Start mu4e in the background so that it syncs mail periodically
(mu4e t)
)
;(dw/leader-key-def (use-package mu4e
; "m" '(:ignore t :which-key "mail") :ensure nil
; "mm" 'mu4e :if (eq system-type 'gnu/linux)
; "mc" 'mu4e-compose-new :load-path "/opt/homebrew/share/emacs/site-lisp/mu4e"
; "mi" 'dw/go-to-inbox ;:defer 20 ; Wait until 20 seconds after startup
; "ms" 'mu4e-update-mail-and-index) ;:defer t
:config
;; Make sure that moving a message (like to Trash) causes the
;; message to get a new file name. This helps to avoid the
;; dreaded "UID is N beyond highest assigned" error.
;; See this link for more info: https://stackoverflow.com/a/43461973
(setq mu4e-change-filenames-when-moving t)
;; Load org-mode integration
;(require 'org-mu4e)
;; Refresh mail using isync every 10 minutes
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/Mail")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-sent-folder "/Sent")
(setq mu4e-refile-folder "/Archive")
(setq mu4e-trash-folder "/Trash")
(setq mu4e-maildir-shortcuts
'(("/Inbox" . ?i)
("/Sent" . ?s)
("/Trash" . ?t)
("/Drafts" . ?d)
("/Spam" . ?z)
("/Archive" . ?a)
))
;; Start mu4e in the background so that it syncs mail periodically ;; Start mu4e in the background so that it syncs mail periodically
(mu4e t) (mu4e t)

63
init.el
View File

@ -169,13 +169,13 @@
) )
((eq system-type 'gnu/linux) ((eq system-type 'gnu/linux)
;; Linux-specific code goes here. ;; Linux-specific code goes here.
(set-face-attribute 'default nil :font "Comic Code Regular" :height efs/default-font-size) (set-face-attribute 'default nil :font "Comic Code" :height efs/default-font-size)
;; Set the fixed pitch face ;; Set the fixed pitch face
(set-face-attribute 'fixed-pitch nil :font "Comic Code Regular" :height efs/default-font-size) (set-face-attribute 'fixed-pitch nil :font "Comic Code" :height efs/default-font-size)
;; Set the variable pitch face ;; Set the variable pitch face
(set-face-attribute 'variable-pitch nil :font "Comic Code Regular" :height efs/default-variable-font-size :weight 'regular) (set-face-attribute 'variable-pitch nil :font "Comic Code" :height efs/default-variable-font-size :weight 'regular)
) )
((eq system-type 'berkeley-unix) ((eq system-type 'berkeley-unix)
;; BSD-specific code goes here. ;; BSD-specific code goes here.
@ -384,7 +384,7 @@
) )
((eq system-type 'gnu/linux) ((eq system-type 'gnu/linux)
;; Linux-specific code goes here. ;; Linux-specific code goes here.
(set-face-attribute (car face) nil :font "Comic Code Regular" :weight 'regular :height (cdr face)) (set-face-attribute (car face) nil :font "Comic Code" :weight 'regular :height (cdr face))
) )
((eq system-type 'berkeley-unix) ((eq system-type 'berkeley-unix)
;; BSD-specific code goes here. ;; BSD-specific code goes here.
@ -845,7 +845,15 @@
(eshell-git-prompt-use-theme 'powerline)) (eshell-git-prompt-use-theme 'powerline))
(setq insert-directory-program "gls" dired-use-ls-dired t) (cond ((eq system-type 'darwin)
;; mac-specific code goes here.
(setq insert-directory-program "gls" dired-use-ls-dired t)
)
((eq system-type 'berkeley-unix)
;; BSD-specific code goes here.
(setq insert-directory-program "gls" dired-use-ls-dired t)
)
)
(use-package dired (use-package dired
:ensure nil :ensure nil
:commands (dired dired-jump) :commands (dired dired-jump)
@ -879,7 +887,7 @@
(use-package mu4e (use-package mu4e
:ensure nil :ensure nil
;:if (eq system-type 'darwin) :if (eq system-type 'darwin)
:load-path "/opt/homebrew/share/emacs/site-lisp/mu4e" :load-path "/opt/homebrew/share/emacs/site-lisp/mu4e"
;:defer 20 ; Wait until 20 seconds after startup ;:defer 20 ; Wait until 20 seconds after startup
;:defer t ;:defer t
@ -912,13 +920,44 @@
("/Archive" . ?a) ("/Archive" . ?a)
)) ))
;; Start mu4e in the background so that it syncs mail periodically
(mu4e t)
)
;(dw/leader-key-def (use-package mu4e
; "m" '(:ignore t :which-key "mail") :ensure nil
; "mm" 'mu4e :if (eq system-type 'gnu/linux)
; "mc" 'mu4e-compose-new :load-path "/opt/homebrew/share/emacs/site-lisp/mu4e"
; "mi" 'dw/go-to-inbox ;:defer 20 ; Wait until 20 seconds after startup
; "ms" 'mu4e-update-mail-and-index) ;:defer t
:config
;; Make sure that moving a message (like to Trash) causes the
;; message to get a new file name. This helps to avoid the
;; dreaded "UID is N beyond highest assigned" error.
;; See this link for more info: https://stackoverflow.com/a/43461973
(setq mu4e-change-filenames-when-moving t)
;; Load org-mode integration
;(require 'org-mu4e)
;; Refresh mail using isync every 10 minutes
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/Mail")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-sent-folder "/Sent")
(setq mu4e-refile-folder "/Archive")
(setq mu4e-trash-folder "/Trash")
(setq mu4e-maildir-shortcuts
'(("/Inbox" . ?i)
("/Sent" . ?s)
("/Trash" . ?t)
("/Drafts" . ?d)
("/Spam" . ?z)
("/Archive" . ?a)
))
;; Start mu4e in the background so that it syncs mail periodically ;; Start mu4e in the background so that it syncs mail periodically
(mu4e t) (mu4e t)