Add doom/{increase,decrease,reset}-font commands
Borrows the idea from zoom-frm (see #1389).
This commit is contained in:
parent
ef4106dae8
commit
0f0fdbc00c
8 changed files with 124 additions and 51 deletions
|
@ -183,30 +183,3 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
|||
(setq doom--buffer-narrowed-origin nil))
|
||||
(t
|
||||
(widen))))
|
||||
|
||||
|
||||
;;
|
||||
;; Modes
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode doom-big-font-mode
|
||||
"A global mode that resizes the font, for streams, screen-sharing and
|
||||
presentations.
|
||||
|
||||
Uses `doom-big-font' when enabled."
|
||||
:init-value nil
|
||||
:lighter " BIG"
|
||||
:global t
|
||||
(unless doom-big-font
|
||||
(user-error "`doom-big-font' must be set to a valid font"))
|
||||
(unless doom-font
|
||||
(user-error "`doom-font' must be set to a valid font"))
|
||||
(let ((doom-font (if doom-big-font-mode
|
||||
doom-big-font
|
||||
doom-font)))
|
||||
(setf (alist-get 'font default-frame-alist)
|
||||
(cond ((null doom-font))
|
||||
((stringp doom-font) doom-font)
|
||||
((fontp doom-font) (font-xlfd-name doom-font))
|
||||
((signal 'wrong-type-argument (list '(fontp stringp) doom-font)))))
|
||||
(set-frame-font doom-font t t)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue