Search code examples
linuxemacselispemacsclient

How to set emacsclient background as Emacs background?


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?


Solution

  • 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")))