如何检查emacs在框架或终端? [英] how to check if emacs in frame or in terminal?
本文介绍了如何检查emacs在框架或终端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据以下问题:如何设置emacsclient背景作为Emacs背景?
我只需要框架背景,而不是终端,而不是控制台。
I need background only for frames, not for terminal and not for console.
这是我如何为控制台添加修复程序
Here is how I'm trying to add fix for 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"))
)
)
但是我没有获得emacsclient的背景(即使是框架)。也许这个支票甚至不能在emacsclient中运行?
But with that I don't get background on emacsclient (even for frames). Maybe the check doesn't even run in emacsclient?
基本上我不想在终端和控制台的emacsclient中添加背景,但是在框架中。
Basically I want to not add background to emacsclient in terminal and console but in frames.
推荐答案
(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)
这篇关于如何检查emacs在框架或终端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文