[ACCEPTED]-emacs equivalent of vim's bg=dark? (setting background to dark)-emacs
I've used the
invert-face function in the past:
M-x invert-face <RET> default
I think the best approach to use is to use 4 ColorTheme. Other options to customize the frame colors 3 you can find here. I can't think about a single 2 command, however you can start emacs with 1
M-x set-variable <RET> frame-background-mode <RET> dark
see also the bottom of https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html
Write this at the end of your
~/.emacs file :
;; dark mode (when (display-graphic-p) (invert-face 'default) ) (set-variable 'frame-background-mode 'dark)
Note: The 3 "when" sentence is there to avoid 2 to invert colors in no-window mode (I presume 1 your terminal has already a black background).
The alect-themes package for Emacs 24 provides light, dark, and 6 black themes, and can be installed either 5 manually or using MELPA.
alect-themes using MELPA 4 and select
(when (>= emacs-major-version 24) (require 'package) (add-to-list 'package-archives '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/")) (package-initialize) (load-theme 'alect-dark) )
There are quite a few 3 color theme packages in MELPA, so if alect-themes 2 doesn't meet your needs, experiment with 1 some of the others.
More Related questions