How to check emacs in frame or in terminal?

Based on this question: How to set emacsclient background as Emacs background?

I only need a background for frames, not a terminal, not a console.

This is how I try to add a fix for the console

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

But with this I do not get background on emacsclient (even for frames). Maybe the check doesn't even run in emacsclient?

Basically, I don't want to add the emacsclient background to the terminal and console, but in frames.

+8
linux emacs elisp emacsclient
source share
2 answers
 (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) 
+5
source share

Perhaps a simpler solution is not to touch * -frame-alist or set-frame- *, but instead Mx set RET to RET by default and then click on the “State” button and select “For all kinds of displays”, at this point you You can set the appearance of the face in different ways for different displays. This part of the user interface is not used very much, and it shows, but you would do: press "INS" to insert the second set of settings, then click "Display" and select "No", then click "Switch" to the left of "Type" and then on the switch to the left of “TTY”: this makes the first set of settings applicable only to tty frames, and the other (which apparently still says “Display: all”) applies to the rest of the cases (i.e. non-tty frames).

+2
source share

All Articles