簡體   English   中英

如何檢查框架內或終端中的emacs?

[英]how to check if emacs in frame or in terminal?

基於這個問題: 如何將emacsclient背景設置為Emacs背景?

我只需要背景框架,而不是終端而不是控制台。

以下是我試圖為控制台添加修復程序的方法

(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中運行?

基本上我不想在終端和控制台中添加背景到emacsclient但是在框架中。

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

也許更簡單的解決方案是不觸摸* -frame-alist,也不設置set-frame- *,而是觸摸Mx customize-face RET默認RET然后中間點擊“狀態”按鈕並選擇“用於各種顯示”此時,您將能夠為不同的顯示設置不同的面部外觀。 UI的這一部分用得不多,它顯示了,但你要做的是:中間點擊INS插入第二組設置,然后在中間點擊“顯示”並選擇“nil”,然后點擊“Type”左側的切換,然后是“TTY”左側的切換:這使得第一組設置僅適用於tty幀,而另一組(可能仍然顯示“Display:all”)適用到其余的情況(即非tty幀)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM