mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 08:14:15 +00:00
Now this function is becoming more my own
This commit is contained in:
parent
cf5e1e70f2
commit
bf098fbdda
1 changed files with 15 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
(make-hash-table))
|
(make-hash-table))
|
||||||
|
|
||||||
;; Font size adjustment
|
;; Font size adjustment
|
||||||
(defun hoagie-adjust-font-size (&optional frame)
|
(defun my/dynamically-adjust-font-size (&optional frame)
|
||||||
"Inspired by https://emacs.stackexchange.com/a/44930/17066. FRAME is ignored.
|
"Inspired by https://emacs.stackexchange.com/a/44930/17066. FRAME is ignored.
|
||||||
If I let Windows handle DPI everything looks blurry."
|
If I let Windows handle DPI everything looks blurry."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -55,6 +55,20 @@
|
||||||
;; (puthash frame size frame-font-size-cache))
|
;; (puthash frame size frame-font-size-cache))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(defun my/adjust-font-size (&optional arg)
|
||||||
|
(interactive "P")
|
||||||
|
(if (not arg)
|
||||||
|
(my/dynamically-adjust-font-size)
|
||||||
|
(let ((font-height (read-number "Font Height (%)? "))
|
||||||
|
(f (selected-frame)))
|
||||||
|
(set-face-attribute 'default f :height font-height)
|
||||||
|
(set-face-attribute 'mode-line f :height font-height)
|
||||||
|
(setq-default olivetti-body-width
|
||||||
|
(if (and (> font-height 120)
|
||||||
|
(boundp 'olivetti-body-width))
|
||||||
|
80
|
||||||
|
140)))))
|
||||||
|
|
||||||
;; (remove-hook 'window-size-change-functions #'hoagie-adjust-font-size)
|
;; (remove-hook 'window-size-change-functions #'hoagie-adjust-font-size)
|
||||||
|
|
||||||
(provide 'hoagie-adjust)
|
(provide 'hoagie-adjust)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue