From 4044fbf28d63352b98bcf47839cfa4d2c37fdfe6 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 9 Mar 2025 21:26:54 +0200 Subject: nerd-icons: Improve font installing somewhat 1. Don't install fonts if don't have graphics available 2. Try to install fonts when a new frame is created --- init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index e0f72d9..50a9c3f 100644 --- a/init.el +++ b/init.el @@ -536,10 +536,11 @@ :straight t :init (defun arkta/nerd-icons-maybe-install-fonts () - (unless (find-font (font-spec :family nerd-icons-font-family)) + (when (and (display-graphic-p) + (not (find-font (font-spec :family nerd-icons-font-family)))) ;; TODO: Maybe also reinstall them every month or so (nerd-icons-install-fonts t))) - :hook (after-init . arkta/nerd-icons-maybe-install-fonts)) + :hook ((after-init server-after-make-frame) . arkta/nerd-icons-maybe-install-fonts)) (use-package nix-mode :straight t -- cgit v1.2.3