Disable the background color when running as service
The previous code snippet didn't work when Emacs was running as a server. Whith this it is working now.
This commit is contained in:
parent
aac0286944
commit
2895036249
|
@ -278,12 +278,13 @@ which I store in my sourec directory as the current theme.
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
;; Color theme
|
||||
;; disable background in terminal
|
||||
(defun on-after-init ()
|
||||
(unless (display-graphic-p (selected-frame))
|
||||
(set-face-background 'default "unspecified-bg" (selected-frame))))
|
||||
|
||||
(add-hook 'window-setup-hook 'on-after-init)
|
||||
(defun on-frame-open (&optional frame)
|
||||
"If the FRAME created in terminal don't load background color."
|
||||
(unless (display-graphic-p frame)
|
||||
(set-face-background 'default "unspecified-bg" frame)))
|
||||
|
||||
(add-hook 'after-make-frame-functions 'on-frame-open)
|
||||
|
||||
(when (boundp 'enable-color-theme)
|
||||
(if (display-graphic-p)
|
||||
|
|
Loading…
Reference in New Issue
Block a user