基于这个问题:
How to set emacsclient background as Emacs background?
我只需要背景框架,而不是终端而不是控制台.
(when (display-graphic-p) (tool-bar-mode -1) (scroll-bar-mode t) (require 'nyan-mode) (nyan-mode) (nyan-start-animation) (mouse-wheel-mode t) (setq default-frame-alist '((background-color . "#101416") (foreground-color . "#f6f3e8")) ) )
但有了这个,我没有得到emacsclient的背景(即使是帧).也许检查甚至没有在emacsclient中运行?
基本上我不想在终端和控制台中添加背景到emacsclient但在框架中.
解决方法
(defun my-frame-config (frame) "Custom behavIoUrs for new frames." (with-selected-frame frame (when (display-graphic-p) (set-background-color "#101416") (set-foreground-color "#f6f3e8")))) ;; run now (my-frame-config (selected-frame)) ;; and later (add-hook 'after-make-frame-functions 'my-frame-config)