I use a dark blue theme, but it seems ugly under the console. So I want to use the color theme under the terminal, what can I do?
Set the "TERM" variable to the monochrome terminal before starting Emacs. For example, if you use xterm, use:
TERM=xterm-mono emacs -nw
If "console" means the Linux console in text mode, you can try using "vt100" (or "vt320").
, , , window-system something, , nil, , So color-theme-darkblue2, :
window-system
something
nil
(if window-system (progn (load "color-theme") (color-theme-darkblue2)))
. , , , else-part, :
(load "color-theme") (if window-system (color-theme-darkblue2) (some-term-theme)))
, , multi-tty Emacs CVS ( 23):
(defun mrc-xwin-look (frame) "Setup to use if running in an X window" (color-theme-deep-blue)) (defun mrc-terminal-look (frame) "Setup to use if running in a terminal" (color-theme-charcoal-black)) (defun mrc-setup-frame (frame) (set-variable 'color-theme-is-global nil) (select-frame frame) (cond ((window-system) (mrc-xwin-look frame) (tool-bar-mode -1) (mrc-maximize-frame)) (t (mrc-terminal-look frame)))) (add-hook 'after-make-frame-functions 'mrc-setup-frame) (add-hook 'after-init-hook (lambda () (mrc-setup-frame (selected-frame))))
, X. ( .)
, :
(defun mrc-maximize-frame () "Toggle frame maximized state" ;; from http://paste.lisp.org/display/54627/raw (interactive) (cond ((eq 'x (window-system)) (progn (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)) (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))) (t (message "Window system %s is not supported by maximize" (symbol-name (window-system))))))
(when window-system (load-theme '<myThemeName>))
Thus, this will load the theme in all cases when the window system is not zero, which in principle is any type of gui.
Source: https://habr.com/ru/post/1699326/More articles:Why do I need source control? - version-controlAutomatic primary key increment in LINQ to SQL DataContext "Insert" partial method - linq-to-sqlForwarding Multiple IIS Domains - iisФильтрация спама для ASP.NET - asp.netWithout creating a list, how can I request integers between two values in Prolog? - prologResetting register values in GCC - assemblyhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699328/how-to-automatically-add-header-files-to-project&usg=ALkJrhixMhD0sgpLMfPiJ5187fVHhTqxQwSaving WCF data between sessions - sessionThe most efficient way to list items in C / C ++ is c ++DNS at Twenty-One Hours - networkingAll Articles