From 0ea4a02c7d0ef0506b6ee36af10ddc407b2ee66e Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 13 May 2022 17:41:49 -0400 Subject: [PATCH] fix use-package dep, interactive font size fn --- init.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/init.el b/init.el index 11baf1c..1c061da 100644 --- a/init.el +++ b/init.el @@ -18,6 +18,9 @@ (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) +;; set up use-package +(straight-use-package 'use-package) + ;; set a bunch of varibles (setq user-full-name "d_m" user-mail-address "d_m@plastic-idolatry.com" @@ -72,6 +75,17 @@ :repo "lumiknit/emacs-pragmatapro-ligatures") :config (add-hook 'prog-mode-hook 'pragmatapro-lig-mode)) +;; interactive font size +(defun set-font-size () + "Set font size interactively." + (interactive) + (let* ((family (face-attribute 'default :family)) + (curHeight (face-attribute 'default :height)) + (curSize (/ curHeight 10)) + (newSize (string-to-number (read-string "Font-size: " (number-to-string curSize)))) + (newHeight (* newSize 10))) + (set-face-attribute 'default nil :height newHeight))) + ;; ;; use doom themes ;; (use-package doom-themes ;; :straight (doom-themes :type git