Fix lag when opening new frames
This commit is contained in:
parent
e79a0f867d
commit
9a0b8c6d04
27
init.el
27
init.el
|
@ -1,18 +1,29 @@
|
|||
;;;; Appearance
|
||||
|
||||
(defun apply-appearance ()
|
||||
(defun apply-appearance-first-frame ()
|
||||
(message "Set first frame appearance")
|
||||
;; Set theme
|
||||
(load-theme 'my-theme +1)
|
||||
;; Use JBMono
|
||||
(set-frame-font "-JB-JetBrainsMonoNL Nerd Font-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1" nil t)
|
||||
;; Hide GTK scroll bar
|
||||
(toggle-scroll-bar -1))
|
||||
(load-theme 'my-theme +1))
|
||||
|
||||
(apply-appearance)
|
||||
(defun apply-appearance-per-frame ()
|
||||
(message "Set per frame appearance")
|
||||
;; Hide scroll bar
|
||||
(toggle-scroll-bar -1)
|
||||
;; Use JBMono
|
||||
(set-frame-font "-JB-JetBrainsMonoNL Nerd Font-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1" nil t))
|
||||
|
||||
(apply-appearance-first-frame)
|
||||
(apply-appearance-per-frame)
|
||||
|
||||
(setq seen-first-frame nil)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame
|
||||
(apply-appearance))))
|
||||
(apply-appearance-per-frame)
|
||||
(if (not seen-first-frame)
|
||||
(progn
|
||||
(setq seen-first-frame 1)
|
||||
(apply-appearance-first-frame))))))
|
||||
|
||||
;; Hide ribbon, menu bar
|
||||
(menu-bar-mode -1)
|
||||
|
|
|
@ -10,8 +10,12 @@
|
|||
`(:background ,(nth type (plist-get args :bg)))))
|
||||
(if (plist-member args :italic) '(:slant italic))))))
|
||||
`(,face
|
||||
,`(,(funcall build-face '((min-colors 256)) 0 args)
|
||||
,(funcall build-face '((min-colors 8)) 1 args))))))
|
||||
,`(
|
||||
,(funcall build-face '((min-colors 0)) 0 args)
|
||||
;;,(funcall build-face '((min-colors 256)) 0 args)
|
||||
;;,(funcall build-face '((min-colors 8)) 1 args)
|
||||
)
|
||||
))))
|
||||
(color-join (lambda (list)
|
||||
(format "#%02x%02x%02x"
|
||||
(ash (nth 0 list) -8)
|
||||
|
|
Loading…
Reference in a new issue