From 240ec1d4d32a690c0c2fd4ef599625bbadb4e137 Mon Sep 17 00:00:00 2001 From: Miranda Marquez Date: Sat, 25 May 2024 20:52:33 -0800 Subject: [PATCH] only do the resolution stuff if neofetch exists --- lisp/mir-defuns.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/mir-defuns.el b/lisp/mir-defuns.el index b638bd9..3993deb 100644 --- a/lisp/mir-defuns.el +++ b/lisp/mir-defuns.el @@ -71,17 +71,18 @@ console." (pixel-scroll-precision-mode t) (pixel-scroll-mode t)) ;; Size of text. おまえ わ もう しんでいる. - (let* ((resolution (mapcar #'string-to-number - (split-string - (cadr (split-string - (shell-command-to-string - "neofetch resolution"))) "x"))) - (resx (car resolution)) - (resy (cadr resolution)) - (font-height (/ resy 11))) - (set-face-attribute 'fixed-pitch nil :height font-height) - (set-face-attribute 'default nil :height font-height) - (set-face-attribute 'variable-pitch nil :height (+ font-height 10)))) + (if (executable-find "neofetch") + (let* ((resolution (mapcar #'string-to-number + (split-string + (cadr (split-string + (shell-command-to-string + "neofetch resolution"))) "x"))) + (resx (car resolution)) + (resy (cadr resolution)) + (font-height (/ resy 11))) + (set-face-attribute 'fixed-pitch nil :height font-height) + (set-face-attribute 'default nil :height font-height) + (set-face-attribute 'variable-pitch nil :height (+ font-height 10))))) (defun toggle-ja-input () "Switch between english and japanese. Not broken."