Fix text scale forever, hopefully

This commit is contained in:
mir 2024-01-23 10:35:52 -09:00
parent 220d1b01ba
commit 4fd3829d47
2 changed files with 12 additions and 14 deletions

View File

@ -96,8 +96,4 @@
(setq gc-cons-threshold (* 2 1000 1000)) (setq gc-cons-threshold (* 2 1000 1000))
;; (add-function :before #'after-focus-change-function #'garbage-collect) ;; (add-function :before #'after-focus-change-function #'garbage-collect)
;; Smallen buffer if windows
(if (equal (window-system) 'w32)
(text-scale-decrease 2))
;;; init.el ends here ;;; init.el ends here

View File

@ -69,16 +69,18 @@ console."
(if (>= (string-to-number emacs-version) 29) (if (>= (string-to-number emacs-version) 29)
(pixel-scroll-precision-mode t) (pixel-scroll-precision-mode t)
(pixel-scroll-mode t)) (pixel-scroll-mode t))
;; Size of text. お前 わ 毛 しんでる. ;; Size of text. おまえ わ もう しんでいる.
(if (eq system-type 'gnu/linux) (let* ((resolution (mapcar #'string-to-number
(progn (split-string
(set-face-attribute 'fixed-pitch nil :height 130) (cadr (split-string
(set-face-attribute 'default nil :height 130) (shell-command-to-string
(set-face-attribute 'variable-pitch nil :height 140)) "neofetch resolution"))) "x")))
(progn (resx (car resolution))
(set-face-attribute 'fixed-pitch nil :height 100) (resy (cadr resolution))
(set-face-attribute 'default nil :height 100) (font-height (/ resy 8)))
(set-face-attribute 'variable-pitch nil :height 110)))) (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 () (defun toggle-ja-input ()
"Switch between english and japanese. Broken." "Switch between english and japanese. Broken."