home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit cd4b562a6e5df3acf27c20d2ad0148972ab36eb7
parent 235a09a30802ab39f8e1b686d7b240ee5e89bbeb
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed, 15 Apr 2020 08:49:51 +0200

emacs: add font and x-resource in early-init

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/early-init.el | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/tools/emacs/early-init.el b/tools/emacs/early-init.el @@ -24,6 +24,23 @@ (setq file-name-handler-alist nil) ;; -FileNameHandler +;; Default font is Ubuntu Mono (and Ubuntu Sans for variable-pitch) +;; If Ubuntu Mono or Ubuntu Sans are not available, use the default Emacs face +(when (member "Ubuntu Mono" (font-family-list)) + (set-face-attribute 'default nil + :family "Ubuntu Mono" + :height font-height)) +(when (member "Ubuntu Sans" (font-family-list)) + (set-face-attribute 'variable-pitch nil + :family "Ubuntu Sans" + :height font-height + :weight 'regular)) + +;; Ignore X resources; its settings would be redundant with the other settings +;; in this file and can conflict with later config (particularly where the +;; cursor color is concerned). +(advice-add #'x-apply-session-resources :override #'ignore) + ;; AfterInitHook (add-hook 'after-init-hook `(lambda ()