How to set emacsclient background as Emacs backgro

2019-02-18 02:23发布

I've got (in my .emacs)

(set-background-color "#101416")
(set-foreground-color "#f6f3e8")

And I've got 2 bindings:

alias ex='emacsclient -nw'
alias ec='emacsclient -c -a ""'

ex works fine to open client in terminal but when I want to open it as a frame I've got white background :(

Why and how can I use my dark background there?

1条回答
Lonely孤独者°
2楼-- · 2019-02-18 02:59

set-background-color and set-foreground-color only affect the current frame, and your .emacs file is not executed when running emacsclient.

Try setting the variable default-frame-alist ("Alist of default values for frame creation") instead:

(setq default-frame-alist
      '((background-color . "#101416")
        (foreground-color . "#f6f3e8")))
查看更多
登录 后发表回答