diff options
| author | 2025-03-09 21:26:54 +0200 | |
|---|---|---|
| committer | 2025-03-09 22:56:36 +0200 | |
| commit | 4044fbf28d63352b98bcf47839cfa4d2c37fdfe6 (patch) | |
| tree | 5f2d7287fbebea30a9ae932cb997c7c2bfe7bf1c | |
| parent | lua-mode: Add .rockspec as a recognised extension (diff) | |
| download | emacs.d-4044fbf28d63352b98bcf47839cfa4d2c37fdfe6.tar.gz emacs.d-4044fbf28d63352b98bcf47839cfa4d2c37fdfe6.tar.xz emacs.d-4044fbf28d63352b98bcf47839cfa4d2c37fdfe6.zip | |
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
| -rw-r--r-- | init.el | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -536,10 +536,11 @@ | |||
| 536 | :straight t | 536 | :straight t |
| 537 | :init | 537 | :init |
| 538 | (defun arkta/nerd-icons-maybe-install-fonts () | 538 | (defun arkta/nerd-icons-maybe-install-fonts () |
| 539 | (unless (find-font (font-spec :family nerd-icons-font-family)) | 539 | (when (and (display-graphic-p) |
| 540 | (not (find-font (font-spec :family nerd-icons-font-family)))) | ||
| 540 | ;; TODO: Maybe also reinstall them every month or so | 541 | ;; TODO: Maybe also reinstall them every month or so |
| 541 | (nerd-icons-install-fonts t))) | 542 | (nerd-icons-install-fonts t))) |
| 542 | :hook (after-init . arkta/nerd-icons-maybe-install-fonts)) | 543 | :hook ((after-init server-after-make-frame) . arkta/nerd-icons-maybe-install-fonts)) |
| 543 | 544 | ||
| 544 | (use-package nix-mode | 545 | (use-package nix-mode |
| 545 | :straight t | 546 | :straight t |