Visual: Simplify and decrease contrast

master
Pierre Neidhardt 2018-07-13 17:41:15 +02:00
parent e623d0471e
commit 10c228f5db
1 changed files with 54 additions and 53 deletions

View File

@ -7,7 +7,8 @@
;;; on it and call `describe-face'. Or browse the `list-faces-display'.
;;; General
(set-face-attribute 'default nil :foreground "white" :background "black")
;; (set-face-attribute 'default nil :foreground "white" :background "black")
(set-face-attribute 'default nil :foreground "white smoke" :background "#101010")
;;; Font size
(when (fboundp 'tool-bar-mode)
@ -22,11 +23,11 @@
(set-face-underline 'link t)
(set-face-foreground 'minibuffer-prompt "#00ffff")
(set-face-background 'region "#191970")
(set-face-attribute 'isearch nil :foreground 'unspecified :background "#2f4f4f" :box "white")
(set-face-attribute 'lazy-highlight nil :inherit 'isearch :foreground 'unspecified :background 'unspecified :box nil)
;; (set-face-attribute 'isearch nil :foreground 'unspecified :background "#2f4f4f" :box "white")
;; (set-face-attribute 'lazy-highlight nil :inherit 'isearch :foreground 'unspecified :background 'unspecified :box nil)
;;; TODO: Highlight with box does not render well in Sx, ediff, occur, evil-search.
(set-face-attribute 'highlight nil :background 'unspecified :box "white")
(set-face-attribute 'error nil :foreground "red" :weight 'bold)
;; (set-face-attribute 'highlight nil :background 'unspecified :box "white")
;; (set-face-attribute 'error nil :foreground "red" :weight 'bold)
;;; Cursor type: default (box) is visible and practical.
;; (setq-default cursor-type 'hollow)
@ -47,21 +48,21 @@
(set-face-background 'whitespace-indentation "#696969"))
;;; Programming
(set-face-foreground 'font-lock-comment-face "#00ced1")
(set-face-foreground 'font-lock-comment-delimiter-face (face-foreground 'font-lock-comment-face))
(set-face-foreground 'font-lock-doc-face "#00dfff")
(set-face-foreground 'font-lock-string-face "#0080d4")
(set-face-foreground 'font-lock-builtin-face (face-foreground 'default))
(set-face-foreground 'font-lock-constant-face (face-foreground 'default))
(set-face-foreground 'font-lock-function-name-face (face-foreground 'default))
(set-face-foreground 'font-lock-keyword-face (face-foreground 'default))
(set-face-foreground 'font-lock-type-face (face-foreground 'default))
(set-face-foreground 'font-lock-variable-name-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-comment-face "#00ced1")
;; (set-face-foreground 'font-lock-comment-delimiter-face (face-foreground 'font-lock-comment-face))
;; (set-face-foreground 'font-lock-doc-face "#00dfff")
;; (set-face-foreground 'font-lock-string-face "#0080d4")
;; (set-face-foreground 'font-lock-builtin-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-constant-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-function-name-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-keyword-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-type-face (face-foreground 'default))
;; (set-face-foreground 'font-lock-variable-name-face (face-foreground 'default))
;;; Compilation mode
(with-eval-after-load 'compile
(set-face-foreground 'compilation-column-number "cyan")
(set-face-foreground 'compilation-line-number "cyan"))
;; (with-eval-after-load 'compile
;; (set-face-foreground 'compilation-column-number "cyan")
;; (set-face-foreground 'compilation-line-number "cyan"))
;;; Ediff
(with-eval-after-load 'ediff-init
@ -96,42 +97,42 @@
(set-face-attribute 'show-paren-match nil :weight 'extra-bold))
;;; Mail mode
(font-lock-add-keywords
'mail-mode
'(
("^From:" . font-lock-warning-face)
("^To:" . font-lock-warning-face)
("^Newsgroups:" . font-lock-warning-face)
("^B?CC:" . font-lock-warning-face)
("^Subject:" . font-lock-warning-face)
("^Reply-To:" . font-lock-warning-face)
("^In-Reply-To:" . font-lock-warning-face)
;; Mail addresses.
("\\([[:alnum:]._-]+@[[:alnum:]._-]+\.[[:alnum:]._-]+\\)" 1 font-lock-string-face)
;; Quotes.
("^\> *\\([^\> ]\\).*$" . font-lock-string-face)
("^\> *\> *\\([^\> ]\\).*$" . font-lock-doc-face)
("^\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
("^\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
("^\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
("^\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
("^\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
("^\> *\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; Signature (multi-line regexes are a bit flaky).
("^--.*\\(\n.*\\)*" . font-lock-comment-face)))
;; (font-lock-add-keywords
;; 'mail-mode
;; '(
;; ("^From:" . font-lock-warning-face)
;; ("^To:" . font-lock-warning-face)
;; ("^Newsgroups:" . font-lock-warning-face)
;; ("^B?CC:" . font-lock-warning-face)
;; ("^Subject:" . font-lock-warning-face)
;; ("^Reply-To:" . font-lock-warning-face)
;; ("^In-Reply-To:" . font-lock-warning-face)
;; ;; Mail addresses.
;; ("\\([[:alnum:]._-]+@[[:alnum:]._-]+\.[[:alnum:]._-]+\\)" 1 font-lock-string-face)
;; ;; Quotes.
;; ("^\> *\\([^\> ]\\).*$" . font-lock-string-face)
;; ("^\> *\> *\\([^\> ]\\).*$" . font-lock-doc-face)
;; ("^\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ("^\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ("^\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ("^\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ("^\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ("^\> *\> *\> *\> *\> *\> *\> *\> *\\([^\> ]\\).*$" . font-lock-comment-face)
;; ;; Signature (multi-line regexes are a bit flaky).
;; ("^--.*\\(\n.*\\)*" . font-lock-comment-face)))
;;; Key notes highlighting. We need to apply it to the mode hook since
;;; font-lock-add-keywords has no inheritance support.
(set-face-foreground 'font-lock-warning-face "DarkOrange")
(defun ambrevar/fontify-comment-tag ()
(font-lock-add-keywords
nil
;; See https://en.wikipedia.org/wiki/Comment_(computer_programming)#Tags.
(mapcar
(lambda (keyword) `(,(concat "\\<\\(" keyword "\\):") 1 font-lock-warning-face prepend))
'("FIXME\\(([^)]+)\\)?" "HACK" "OPTIMIZE\\(([^)]+)\\)?" "REVIEW\\(([^)]+)\\)?" "TODO\\(([^)]+)\\)?" "UNDONE" "UX" "WARNING" "XXX"))))
(dolist (hook '(prog-mode-hook text-mode-hook))
(add-hook hook 'ambrevar/fontify-comment-tag))
;; (set-face-foreground 'font-lock-warning-face "DarkOrange")
;; (defun ambrevar/fontify-comment-tag ()
;; (font-lock-add-keywords
;; nil
;; ;; See https://en.wikipedia.org/wiki/Comment_(computer_programming)#Tags.
;; (mapcar
;; (lambda (keyword) `(,(concat "\\<\\(" keyword "\\):") 1 font-lock-warning-face prepend))
;; '("FIXME\\(([^)]+)\\)?" "HACK" "OPTIMIZE\\(([^)]+)\\)?" "REVIEW\\(([^)]+)\\)?" "TODO\\(([^)]+)\\)?" "UNDONE" "UX" "WARNING" "XXX"))))
;; (dolist (hook '(prog-mode-hook text-mode-hook))
;; (add-hook hook 'ambrevar/fontify-comment-tag))
;;; Man pages
(with-eval-after-load 'man
@ -142,7 +143,7 @@
;;; Term
;;; Use lighter blue.
(with-eval-after-load 'ansi-color
(setf (aref ansi-color-map 34) '(foreground-color . "#1e90ff")))
;; (with-eval-after-load 'ansi-color
;; (setf (aref ansi-color-map 34) '(foreground-color . "#1e90ff")))
(provide 'visual)