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))
;; (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

View File

@ -69,16 +69,18 @@ console."
(if (>= (string-to-number emacs-version) 29)
(pixel-scroll-precision-mode t)
(pixel-scroll-mode t))
;; Size of text. お前 わ 毛 しんでる.
(if (eq system-type 'gnu/linux)
(progn
(set-face-attribute 'fixed-pitch nil :height 130)
(set-face-attribute 'default nil :height 130)
(set-face-attribute 'variable-pitch nil :height 140))
(progn
(set-face-attribute 'fixed-pitch nil :height 100)
(set-face-attribute 'default nil :height 100)
(set-face-attribute 'variable-pitch nil :height 110))))
;; 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 8)))
(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. Broken."