diff --git a/core/core-ui.el b/core/core-ui.el index e1b705739..6592485ec 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -282,14 +282,14 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq window-resize-pixelwise t frame-resize-pixelwise t) -(when (bound-and-true-p tool-bar-mode) +(unless (assq 'menu-bar-lines default-frame-alist) ;; We do this in early-init.el too, but in case the user is on Emacs 26 we do ;; it here too: disable tool and scrollbars, as Doom encourages ;; keyboard-centric workflows, so these are just clutter (the scrollbar also ;; impacts performance). - (push '(menu-bar-lines . 0) default-frame-alist) - (push '(tool-bar-lines . 0) default-frame-alist) - (push '(vertical-scroll-bars) default-frame-alist)) + (add-to-list 'default-frame-alist '(menu-bar-lines . 0)) + (add-to-list 'default-frame-alist '(tool-bar-lines . 0)) + (add-to-list 'default-frame-alist '(vertical-scroll-bars))) (when IS-MAC ;; Curse Lion and its sudden but inevitable fullscreen mode! diff --git a/early-init.el b/early-init.el index eea1e8fc2..cf3138571 100644 --- a/early-init.el +++ b/early-init.el @@ -13,10 +13,9 @@ (advice-add #'package--ensure-init-file :override #'ignore) ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. -(setq tool-bar-mode nil - menu-bar-mode nil) -(when (fboundp 'set-scroll-bar-mode) - (set-scroll-bar-mode nil)) +(push '(menu-bar-lines . 0) default-frame-alist) +(push '(tool-bar-lines . 0) default-frame-alist) +(push '(vertical-scroll-bars) default-frame-alist) ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we easily halve startup times with fonts that are