Recent builds of Emacs (27, 26?) support transparent titlebars on
MacOS via the ns-transparent-titlebar
and ns-appearance
frame
properties. The latter indicates whether the titlebar background
should be dark
or light
, and it is not set automatically by
Emacs. However, the text colour is always taken from the current
theme, which can lead to unreadable titlebar text if ns-appearance
is not set correctly.
This Emacs package provides a global minor mode,
ns-auto-titlebar-mode
which - when enabled - keeps the
"ns-appearance" frame parameter correctly set in GUI frames so that it
matches the currently-enabled theme, whether it is light or dark.
For this package to work correctly, it is generally necessary that the
theme you use sets the frame-background-mode
variable appropriately.
This can be set manually if necessary, but see the docs for that
variable.
If you choose not to use one of the convenient
packages in MELPA, you'll need to
add the directory containing ns-auto-titlebar.el
to your load-path
, and
then (require 'ns-auto-titlebar)
.
Enable ns-auto-titlebar-mode
with M-x customize
, or like this:
(when (eq system-type 'darwin) (ns-auto-titlebar-mode))
Note that it is safe to omit the "when" condition if you prefer.