Support font-increase & font-decrease fns
Support functions for increasing and decreasing Emacs's font size -- without requiring a full restart.
This commit is contained in:
parent
0e73a0e77f
commit
014b530037
1 changed files with 20 additions and 0 deletions
|
@ -12,6 +12,26 @@
|
|||
;; change font
|
||||
(add-to-list 'default-frame-alist '(font . "Operator Mono-10"))
|
||||
|
||||
(defconst wpc/font-size-step 10
|
||||
"The amount (%) by which to increase or decrease a font.")
|
||||
|
||||
(defun wpc/increase-font ()
|
||||
"Increase font size."
|
||||
(interactive)
|
||||
(->> (face-attribute 'default :height)
|
||||
(+ wpc/font-size-step)
|
||||
(set-face-attribute 'default (selected-frame) :height)))
|
||||
|
||||
(defun wpc/decrease-font ()
|
||||
"Decrease font size."
|
||||
(interactive)
|
||||
(->> (face-attribute 'default :height)
|
||||
(+ (- wpc/font-size-step))
|
||||
(set-face-attribute 'default (selected-frame) :height)))
|
||||
|
||||
(general-def "s-j" #'wpc/decrease-font)
|
||||
(general-def "s-k" #'wpc/increase-font)
|
||||
|
||||
;; smooth scrolling settings
|
||||
(setq scroll-step 1
|
||||
scroll-conservatively 10000)
|
||||
|
|
Loading…
Reference in a new issue