diff options
author | Amin Bandali <bandali@gnu.org> | 2020-04-25 02:06:56 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2020-04-25 02:06:56 -0400 |
commit | 71b55010865881a496ace53deafa04da458bcec1 (patch) | |
tree | 1a6e68a45751586044e50545b8e529dc1dd532b1 /refinery-theme.el | |
download | refinery-theme-71b55010865881a496ace53deafa04da458bcec1.tar.gz refinery-theme-71b55010865881a496ace53deafa04da458bcec1.tar.xz refinery-theme-71b55010865881a496ace53deafa04da458bcec1.zip |
Initial check-in of Refineryv0.1.0
* COPYING: plain text copy of GNU General Public License version 3.
* refinery-theme.el: Initial check-in, under GPLv3+.
Diffstat (limited to '')
-rw-r--r-- | refinery-theme.el | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/refinery-theme.el b/refinery-theme.el new file mode 100644 index 0000000..23fda2b --- /dev/null +++ b/refinery-theme.el @@ -0,0 +1,168 @@ +;;; refinery-theme.el --- refined, minimalist, layered theme -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Amin Bandali + +;; Author: Amin Bandali <bandali@gnu.org> +;; Version: 0.1.0 +;; Keywords: faces + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Refinery is a refined, minimalist theme inspired by the beautiful +;; Commentary theme by Simon Zelazny. Like Commentary, Refinery uses +;; a concept of ``layers'' of style to visually accentuate the more +;; important parts text in a useful yet subtle way, while keeping the +;; distractions at a minimum. + +;; 1. Comments are in red, so they easily stand out! +;; +;; 2. Strings have a subtle light yellow background, so as to help +;; make it easier to spot their beginning and end points. +;; +;; 3. Function/macro definitions are in bold to help them stand out +;; from ordinary text. + +;;; Code: + +(deftheme refinery + "A minimalist high-contrast theme for GNU Emacs. +Includes themed faces for modes/packages like Isearch, Gnus, +Message, EBDB, and Ivy.") + +(let* (;; supported classes of terminals + (class '((class color) (min-colors 16))) + + ;; colors + (black "#000000") + (white "#ffffff") + (yellow "#ffffdf") + (yellow+1 "#dfdfaf") + (yellow+2 "#fce94f") + (grey "#e7e7e7") + (grey-1 "#666666") + (grey-2 "#888888") + (blue "#204a87") + (red "#a40000") ; #d70000 + (orange "#ce5c00") + (green "#4e9a06") + + ;; layers + (layer-2 `((,class (:foreground ,grey-2)))) + (layer-1 `((,class (:foreground ,grey-1)))) + (layer0 `((,class (:foreground ,black)))) + (layer0-inv `((,class (:background ,black)))) + (layer+1 `((,class (:foreground ,black :background ,yellow)))) + (layer+2 `((,class (:foreground ,black :weight bold)))) + (layer+3 `((,class (:foreground ,red)))) + (layer+3b `((,class (:foreground ,red :weight bold)))) + (layer+4 `((,class (:foreground ,red :background ,grey)))) + (layer+4-inv `((,class (:foreground ,grey :background ,red)))) + (layer+4b `((,class (:foreground ,red :background ,grey :weight bold)))) + (layer+4b-inv `((,class (:foreground ,grey :background ,red :weight bold)))) + + ;; box + (box `((,class (:box (:line-width -1 :style released-button)))))) + + (custom-theme-set-faces + 'refinery + + `(default ,layer0) + `(cursor ,layer0-inv) + + ;; Highlighting + `(linum ((,class (:background ,grey)))) + `(fringe ((,class (:background ,white)))) + `(highlight ((,class (:background ,yellow+2)))) + `(hl-line ((,class (:background ,yellow+1)))) + `(region ((,class (:background ,yellow+1)))) + `(secondary-selection ((,class (:background ,yellow+2)))) + `(isearch ((,class (:foreground ,white :background ,grey-1)))) + `(lazy-highlight ((,class (:background ,grey)))) + `(trailing-whitespace ,layer+4b-inv) + `(whitespace-trailing ,layer+4b-inv) + + ;; Parens + `(show-paren-match ,layer+4b) + `(show-paren-mismatch ,layer+4b-inv) + + ;; Comments and documentation + `(font-lock-comment-face ,layer+3) + `(font-lock-doc-face ,layer+3) + + ;; Function definitions + `(font-lock-function-name-face ,layer+2) + + ;; String literals + `(font-lock-string-face ,layer+1) + + ;; Constants, variables, and their types + `(font-lock-constant-face ,layer0) + `(font-lock-variable-name-face ,layer0) + `(font-lock-type-face ,layer0) + + ;; Built-ins and keywords + `(font-lock-builtin-face ,layer-1) + `(font-lock-keyword-face ,layer-2) + + ;; Mode line and minibuffer prompt + `(mode-line ,box) + `(mode-line-inactive ,box) + `(minibuffer-prompt ,layer+2) + + ;; Characters displayed as sequences using `^' or `\' + `(escape-glyph ,layer+3) + + ;; Gnus, Message, and EBDB + `(gnus-group-mail-3 ,layer+2) + `(gnus-group-mail-3-empty ,layer-2) + `(gnus-summary-normal-ticked ,layer+3) + `(gnus-header-from ,layer+3b) + `(gnus-header-subject ,layer+3) + `(gnus-header-name ,layer-2) + `(gnus-header-content ,layer0) + `(message-header-to ,layer+3b) + `(message-header-cc ,layer0) + `(message-header-subject ,layer0) + `(message-header-other ,layer-2) + `(message-header-name ,layer-2) + `(message-header-xheader ((,class (:foreground ,blue)))) + `(ebdb-person-name ,layer+3b) + + ;; Ivy and family + `(ivy-minibuffer-match-face-1 ((,class (:background "#eeeeee")))) + `(ivy-minibuffer-match-face-2 ((,class (:background ,grey :weight bold)))) + `(ivy-minibuffer-match-face-3 ((,class (:background "light goldenrod" :weight semi-bold)))) + `(ivy-minibuffer-match-face-4 ((,class (:background "misty rose" :weight semi-bold)))) + `(ivy-current-match ((((class color) (background light)) + :background "#d7d7d7" :foreground ,black) + (((class color) (background dark)) + :background "#65a7e2" :foreground ,black))) + + ;; Error/failure, warning, and success + `(error ,layer+3b) + `(warning ((,class (:foreground ,orange)))) + `(success ((,class (:foreground ,green))))) + + (custom-theme-set-variables 'refinery)) + +;;;###autoload +(when (and (boundp 'custom-theme-load-path) load-file-name) + (add-to-list 'custom-theme-load-path + (file-name-as-directory + (file-name-directory load-file-name)))) + +(provide-theme 'refinery) +;;; refinery-theme.el ends here |