Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maio committed Feb 20, 2016
0 parents commit 449b754
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Eink color theme for Emacs

Low distraction, minimalistic color theme for Emacs emulating reading
on E Ink devices.

## Example

![Example](https://raw.githubusercontent.com/maio/eink-emacs/master/images/example.png)

## Why?

Back in a day, I used to play a lot with color themes. One day I
pair-programmed with coleague of mine and I noticed that he didn't use
syntax highlighting at all. It's been quite a strange experince, but
after a while I decided to give it a try.

Well, long story short, I started to really like it and there was no
way going back. Now I find most of the color themes quite distracting.

Many of these color themes are using shining colors for stuff I don't
care about (e.g. builtin functions), and they try to hide things I
want to see (e.g. useful comments).

## Other packages which I use along with this theme

- [idle-highlight](https://github.com/nonsequitur/idle-highlight-mode)
- [paren-face](https://github.com/tarsius/paren-face)
191 changes: 191 additions & 0 deletions eink-theme.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
;; -*- mode: emacs-lisp; mode: rainbow -*-
;;; eink-theme.el --- E Ink color theme for Emacs.

;; Copyright (C) 2013-2016 Marian Schubert

;; Author: Marian Schubert <marian.schubert@gmail.com>
;; URL: http://github.com/maio/eink-emacs
;; Version: 1.0

;; 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 <http://www.gnu.org/licenses/>.

;;; Commentary:

;; Low distraction, minimalistic color theme for Emacs emulating reading
;; on E Ink devices.

;;; Credits:

;; Inspired by:
;;
;; https://bitbucket.org/kisom/eink.vim
;; https://github.com/dmand/eink.el
;; http://www.daveliepmann.stfi.re/tufte-css/?sf=wklwy

;;; Code:

(deftheme eink
"Theme emulating reading on an E Ink device.")

(let ((fg "#111111")
(bg "#fffff8")
(bg-light "#ddddd8")
(fg-light "#ddddd8")
(bg-highlight "#FFF1AA")
(bg-highlight-2 "LightCyan")
(bg-highlight-3 "LightGreen"))

(custom-theme-set-faces
'eink

;; generic stuff
`(default ((t (:background ,bg :foreground ,fg))))
`(button ((t (:foreground ,fg :underline t))))
`(cursor ((t (:background ,fg :foreground "white smoke"))))
`(custom-variable-tag ((t (:foreground ,fg :weight bold))))
`(default-italic ((t (:italic t))))
`(font-latex-bold-face ((t (:foreground ,fg))))
`(font-latex-italic-face ((t (:foreground ,fg :slant italic))))
`(font-latex-match-reference-keywords ((t (:foreground ,fg))))
`(font-latex-match-variable-keywords ((t (:foreground ,fg))))
`(font-latex-string-face ((t (:foreground "#a9a9a9"))))
`(font-lock-builtin-face ((t (:background ,bg :foreground ,fg))))
`(font-lock-comment-delimiter-face ((t (:foreground "#808080"))))
`(font-lock-comment-face ((t (:foreground ,fg :weight bold))))
`(font-lock-constant-face ((t (:foreground ,fg))))
`(font-lock-doc-face ((t (:foreground ,fg :weight semi-bold))))
`(font-lock-function-name-face ((t (:foreground ,fg))))
`(font-lock-keyword-face ((t (:foreground ,fg))))
`(font-lock-preprocessor-face ((t (:foreground ,fg))))
`(font-lock-reference-face ((t (:foreground ,fg))))
`(font-lock-string-face ((t (:foreground ,fg))))
`(font-lock-type-face ((t (:foreground ,fg))))
`(font-lock-variable-name-face ((t (:foreground ,fg :underline nil))))
`(font-lock-warning-face ((t (:foreground ,fg :weight bold))))
`(fringe ((t (:background ,bg :foreground ,bg))))
`(gnus-header-content ((t (:foreground ,fg))))
`(gnus-header-from ((t (:foreground ,fg))))
`(gnus-header-name ((t (:foreground ,fg))))
`(gnus-header-subject ((t (:foreground ,fg))))
`(highlight ((t nil)))
`(ido-first-match ((t (:foreground ,fg))))
`(ido-only-match ((t (:foreground ,fg))))
`(ido-subdir ((t (:foreground ,fg))))
`(isearch ((t (:background "#eeeee8" :foreground ,fg))))
`(link ((t (:foreground ,fg))))
`(minibuffer-prompt ((t (:foreground ,fg :weight bold))))
`(mode-line ((t (:background ,bg-light :foreground ,fg :height 0.8))))
`(mode-line-buffer ((t (:foreground ,fg :weight bold))))
`(mode-line-inactive ((t (:background ,bg-light :foreground ,bg-light :height 0.8))))
`(mode-line-minor-mode ((t (:weight ultra-light))))
`(modeline ((t (:background ,bg :foreground ,fg :height 0.8))))
`(org-agenda-date ((t (:foreground ,fg :height 1.2))))
`(org-agenda-date-today ((t (:foreground ,fg :weight bold :height 1.4))))
`(org-agenda-date-weekend ((t (:foreground ,fg :weight normal))))
`(org-agenda-structure ((t (:foreground ,fg :weight bold))))
`(org-block ((t (:foreground ,fg))))
`(org-block-begin-line ((t (:foreground ,fg-light))))
`(org-block-end-line ((t (:foreground ,fg-light))))
`(org-date ((t (:foreground ,fg) :underline)))
`(org-done ((t (:foreground ,fg-light))))
`(org-hide ((t (:foreground ,bg))))
`(org-level-1 ((t (:foreground ,fg :weight semi-bold :height 1.3))))
`(org-level-2 ((t (:foreground ,fg :weight semi-bold :height 1.1))))
`(org-level-3 ((t (:foreground ,fg :weight semi-bold :height 1.1))))
`(org-level-4 ((t (:foreground ,fg :weight semi-bold :height 1.1))))
`(org-level-5 ((t (:foreground ,fg :weight semi-bold :height 1.1))))
`(org-level-6 ((t (:foreground ,fg :weight semi-bold :height 1.1))))
`(org-link ((t (:foreground ,fg :underline t))))
`(org-quote ((t (:foreground ,fg :slant italic :inherit org-block))))
`(org-scheduled ((t (:foreground ,fg))))
`(org-sexp-date ((t (:foreground ,fg))))
`(org-special-keyword ((t (:foreground ,fg))))
`(org-todo ((t (:foreground ,fg))))
`(org-verse ((t (:inherit org-block :slant italic))))
`(region ((t (:background "#eeeee8" :foreground ,fg))))
`(slime-repl-inputed-output-face ((t (:foreground ,fg))))
`(whitespace-line ((t (:background ,bg-highlight-2 :foreground ,fg))))

;; magit
`(magit-header ((t (:weight bold))))
`(magit-item-mark ((t (:background ,bg-highlight))))
`(magit-item-highlight ((t (:weight bold))))
`(magit-section-heading ((t (:weight bold :height 1.2))))
`(magit-section-highlight ((t (:inherit default))))
`(magit-diff-context-highlight ((t (:weight bold))))
`(magit-branch-local ((t (:weight bold))))
`(magit-branch-remote ((t (:weight bold))))

;; compile
`(compilation-error ((t (:inherit error))))

;; flycheck
`(flycheck-error ((t (:inherit error))))
`(flycheck-warning ((t (:inherit warning))))

;; dired
`(dired-directory ((t (:weight bold))))

;; helm
`(helm-source-header ((t (:foreground ,fg :background "grey90" :weight bold))))
`(helm-header ((t (:foreground ,fg))))
`(helm-selection-line ((t (:inherit region :weight bold))))
`(helm-selection ((t (:background ,bg-highlight))))
`(helm-ff-directory ((t (:foreground ,fg :weight bold))))
`(helm-ff-dotted-directory ((t (:foreground ,fg :weight bold))))
`(helm-ff-symlink ((t (:foreground ,fg :slant italic))))
`(helm-ff-executable ((t (:foreground ,fg))))

;; iedit
`(iedit-occurrence ((t (:background ,bg-highlight-3 :foreground ,fg))))

;; parens - parenface
'(parenface-paren-face ((t (:foreground "gray70"))))
'(parenface-curly-face ((t (:foreground "gray70"))))
'(parenface-bracket-face ((t (:foreground "gray70"))))

;; parens - paren-face
'(parenthesis ((t (:foreground "gray70"))))

;; parens - other
`(sp-show-pair-match-face ((t (:foreground "black" :weight bold))))
`(sp-show-pair-mismatch-face ((t (:background "red" :foreground "black" :weight bold))))
`(show-paren-match ((t (:foreground "black" :weight bold))))
`(show-paren-mismatch ((t (:background "red" :foreground "black" :weight bold))))

;; js2
`(js2-function-param ((t (:foreground ,fg))))
`(js2-external-variable ((t (:foreground ,fg))))

;; perl
`(cperl-hash-face ((t (:foreground ,fg))))
`(cperl-array-face ((t (:foreground ,fg))))
`(cperl-nonoverridable-face ((t (:foreground ,fg))))

;; rpm-spec-mode
`(rpm-spec-tag-face ((t (:inherit default))))
`(rpm-spec-package-face ((t (:inherit default))))
`(rpm-spec-macro-face ((t (:inherit default))))
`(rpm-spec-doc-face ((t (:inherit default))))
`(rpm-spec-var-face ((t (:inherit default))))
`(rpm-spec-ghost-face ((t (:inherit default))))
`(rpm-spec-section-face ((t (:inherit default :weight bold))))

;; misc
`(idle-highlight ((t (:background ,bg-highlight))))
`(yas-field-highlight-face ((t (:background "#eeeee8" :foreground ,fg))))
`(eshell-prompt ((t (:foreground ,fg :weight bold))))
`(cider-result-overlay-face ((t (:weight bold))))))

(provide-theme 'eink)
Binary file added images/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 449b754

Please sign in to comment.