0

I'm using the emacs-mac port installed via Homebrew in macOS 10.14.4. (I installed it with the flag --with-natural-title-bar). I enabled the transparent title bar feature with

defaults write org.gnu.Emacs TransparentTitleBar DARK

as indicated here.

However, I get the expected behavior with some themes but not others. Here, for example is what things look like using doom-spacegray (from doom-themes: enter image description here

And here is how things look like when I use the nord theme for Emacs:enter image description here

I'm using a fairly minimal configuration. In case it matters, this is all there is to it:

;; Package system and sources.
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                 (not (gnutls-available-p))))
    (proto (if no-ssl "http" "https")))
    ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
    (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
    ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
    (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))

(package-initialize)


;; We will use 'use-package' to install and configure packages.
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(eval-when-compile (require 'use-package))

(setq use-package-always-ensure t)


(setq
 inhibit-startup-message t         ; Don't show the startup message...
 inhibit-startup-screen t          ; ... or screen
 cursor-in-non-selected-windows t  ; Hide the cursor in inactive windows

 echo-keystrokes 0.1               ; Show keystrokes right away, don't show the message in the scratch buffer
 initial-scratch-message nil       ; Empty scratch buffer
 initial-major-mode 'org-mode      ; Org mode by default
 sentence-end-double-space nil     ; Sentences should end in one space, come on!
 confirm-kill-emacs 'y-or-n-p      ; y and n instead of yes and no when quitting
 help-window-select t              ; Select help window so it's easy to quit it with 'q'
)

(fset 'yes-or-no-p 'y-or-n-p)      ; y and n instead of yes and no everywhere else
(delete-selection-mode 1)          ; Delete selected text when typing
(global-unset-key (kbd "s-p"))     ; Don't print

;; Enable transparent title bar on macOS
;;(when (memq window-system '(mac ns))
;;  (add-to-list 'default-frame-alist '(ns-appearance . dark)) ;; {light, dark}
;;  (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)))

;; Hide toolbar and scroll bar
(tool-bar-mode -1)
(scroll-bar-mode -1)

;; Always wrap lines
(global-visual-line-mode 1)

;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
; (package-initialize)

; (require 'package)
; (add-to-list 'package-archives
;              '("melpa-stable" . "https://stable.melpa.org/packages/"))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(inhibit-startup-screen t)
 '(initial-scratch-message nil)
 '(package-selected-packages (quote (nord-theme doom-themes))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

I'm hoping someone might know where the source of the problem could be. Is there something about nord-theme that is overriding the transparent title bar option in emacs-mac? Is it possible to theme the title-bar in GUI Emacs? If so, what are the relevant variables?

  • Appears to be a function of the patch that formula is using. Works perfectly fine with Emacs from source. – nega May 9 at 21:24
  • And Emacs for Mac OS X via brew cask install emacs. – nega May 9 at 21:40
  • Hmm. Interesting. I should have tried that first. Thanks! – apc May 10 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.