Add ns-auto-titlebar package for MacOS

This fixes mismatching frame title and frame coloring, as well as
auto-sets the ns-appearance parameter depending on your theme.
This commit is contained in:
Henrik Lissner 2018-10-25 13:42:20 -04:00
parent 86305f2175
commit f43e64e505
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 11 additions and 6 deletions

View file

@ -34,7 +34,15 @@
;; Don't open files from the workspace in a new frame ;; Don't open files from the workspace in a new frame
ns-pop-up-frames nil) ns-pop-up-frames nil)
;; Fix the clipboard in terminal or daemon Emacs (non-GUI)
(when (or (daemonp) (not (display-graphic-p)))
(add-hook 'doom-post-init-hook #'osx-clipboard-mode))
(when (or (daemonp) (display-graphic-p)) (when (or (daemonp) (display-graphic-p))
;; Syncs ns frame parameters with theme (and fixes mismatching text
;; colr in the frame title)
(require 'ns-auto-titlebar nil t)
;; A known problem with GUI Emacs on MacOS (or daemons started via ;; A known problem with GUI Emacs on MacOS (or daemons started via
;; launchctl or brew services): it runs in an isolated ;; launchctl or brew services): it runs in an isolated
;; environment, so envvars will be wrong. That includes the PATH ;; environment, so envvars will be wrong. That includes the PATH
@ -48,11 +56,7 @@
exec-path-from-shell-debug doom-debug-mode exec-path-from-shell-debug doom-debug-mode
exec-path-from-shell-variables exec-path-from-shell-variables
(nconc exec-path-from-shell-variables '("LC_CTYPE" "LC_ALL" "LANG"))) (nconc exec-path-from-shell-variables '("LC_CTYPE" "LC_ALL" "LANG")))
(exec-path-from-shell-initialize))) (exec-path-from-shell-initialize))))
;; Fix the clipboard in terminal or daemon Emacs (non-GUI)
(when (or (daemonp) (not (display-graphic-p)))
(add-hook 'doom-post-init-hook #'osx-clipboard-mode)))
(IS-LINUX (IS-LINUX
(setq x-gtk-use-system-tooltips nil ; native tooltips are ugly! (setq x-gtk-use-system-tooltips nil ; native tooltips are ugly!

View file

@ -4,7 +4,8 @@
;; core-os.el ;; core-os.el
(when IS-MAC (when IS-MAC
(package! exec-path-from-shell) (package! exec-path-from-shell)
(package! osx-clipboard)) (package! osx-clipboard)
(package! ns-auto-titlebar))
;; core-ui.el ;; core-ui.el
(package! all-the-icons) (package! all-the-icons)