commit 94a6ae7d2d6617fca1cda50d52c99ce1fd5235f2
parent 371de21f25ae71d28086bf4f3270fb8f13b0dd8e
Author: Jake Koroman <jakekoroman@gmail.com>
Date: Sun, 11 Aug 2024 14:26:20 -0400
added big font toggle to emacs.
Diffstat:
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
@@ -401,7 +401,11 @@
;; Buffer Binds
"b p" '(previous-buffer :which-key "Open previous buffer")
"b n" '(next-buffer :which-key "Open next buffer")
- "b k" '(kill-current-buffer :which-key "Kill current buffer"))
+ "b k" '(kill-current-buffer :which-key "Kill current buffer")
+
+ ;; Toggles
+ "t b" '(toggle-big-font :which-key "Toggles big font")
+ )
(defun previous-blank-line ()
"Moves to the previous line containing nothing but whitespace."
@@ -523,6 +527,15 @@
(load "device.el")
+(setq default-frame-alist `((font . ,my-font)))
+
+(defun toggle-big-font ()
+ "Toggles on/off a bigger font for hidpi or presentations"
+ (interactive)
+ (if (eq (aref (font-info (face-attribute 'default :font)) 2) my-font-size)
+ (set-frame-font (concat "Iosevka Nerd Font:pixelsize=" (number-to-string my-font-big-size)) nil t)
+ (set-frame-font (concat my-font-name (number-to-string my-font-size)) nil t)))
+
;; ;; Startup time
;; (defun efs/display-startup-time ()
;; (message
diff --git a/device-specific/laptop/emacs.el b/device-specific/laptop/emacs.el
@@ -1,11 +1,9 @@
-(setq default-frame-alist '((font . "Iosevka Nerd Font:pixelsize=18")))
-;; (setq default-frame-alist '((font . "Liberation Mono-12")))
+(setq my-font-name "Iosevka Nerd Font:pixelsize=")
+(setq my-font-size 18)
+(setq my-font-big-size 30)
+(setq my-font (concat my-font-name (number-to-string my-font-size)))
-;; (split-window-horizontally)
-;; (toggle-frame-maximized)
(set-default 'truncate-lines t)
-;; (list-colors-display) for a color picker
(load-theme 'solarized t)
(solarized-toggle-background-mode)
-;; (update-theme)
(transparency 100)