For more context, see this GitHub issue. When installing emacs-mac via Homebrew with --with-natural-title-bar on macOS Sonoma, there is a very large title bar. I think this is because of the size of the tool bar icons, as you can see in the linked GitHub issue.
If you start Emacs like /Applications/Emacs.app/Contents/MacOS/Emacs -q --eval '(tool-bar-mode 0)', then the title bar ends up being a reasonable size.
However, with Doom Emacs, simply putting (tool-bar-mode 0) in config.el doesn’t fix the issue because it seems like Doom is lazy loading tool bar configuration, as far as I can tell. But if I explicitly toggle tool-bar-mode off after Doom has started up, then the title bar shrinks to a more reasonable size.
What did you expect to happen?
I expected setting (tool-bar-mode 0) in config.el to shrink the title bar to a more reasonable size at Emacs startup time. How can I have the title bar be a reasonable size at Emacs startup time without having to explicitly toggle tool-bar-mode off after Emacs has started?
Steps to reproduce
brew install emacs-mac --with-natural-title-bar
/Applications/Emacs.app/Contents/MacOS/Emacs -q to get large title bar
/Applications/Emacs.app/Contents/MacOS/Emacs -q --eval '(tool-bar-mode 0)' to get small/reasonable title bar
/Applications/Emacs.app/Contents/MacOS/Emacs to get large title bar with Doom configuration (regardless of whether config.el contains (tool-bar-mode 0))
Thanks! That suggestion works for me. Any idea what the ultimate source of the issue is here and what a more permanent fix might look like? Perhaps I should be opening an issue against Doom Emacs instead of asking this question here if this is a bug?
Based on the fact, that opening emacs with emacs -Q --eval='(tool-bar-mode 0)' opens it with a normal sized toolbar, I believe, that it is indeed a bug in doom emacs.
Based on the bug reported in the above comment, this seems to be fixed. I upgraded my mac to sonoma today (12/27/2023) and I am facing this issue. Based on information in the git link - I can see that that fix is applied. In my mac, I can see that my emacs-mac (installed based on instructions from railwaycat/emacsmacport), but the latest version I have does not seem to have that fix applied.
Can anyone help me by confirming if this issue has to be fixed in the interim by using a different branch’s code for emacs-mac? For now, I am manually disabling tool-bar-mode everytime after start-up
Thanks! Using brew install emacs-mac --HEAD works pretty well. After the installation, the huge title bar is gone. I’m new to emacs-mac build, the Emasc native support for blur also works for now: (add-to-list 'default-frame-alist '(alpha-background . 50)), it surprised me.