guixsd-config

GuixSD configs for my systems
Log | Files | Refs

simple-dark-theme.el (16326B)


      1 ;;; simple-dark-theme.el --- Theme
      2 
      3 ;; Copyright (C) 2022 , tek256
      4 
      5 ;; Author: tek256
      6 ;; Version: 0.1
      7 ;; Package-Requires: ((emacs "24"))
      8 ;; Created with ThemeCreator, https://github.com/mswift42/themecreator.
      9 
     10 
     11 ;; This program is free software: you can redistribute it and/or modify
     12 ;; it under the terms of the GNU General Public License as published by
     13 ;; the Free Software Foundation, either version 3 of the License, or
     14 ;; (at your option) any later version.
     15 
     16 ;; This program is distributed in the hope that it will be useful,
     17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
     18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     19 ;; GNU General Public License for more details.
     20 
     21 ;; You should have received a copy of the GNU General Public License
     22 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
     23 
     24 ;; This file is not part of Emacs.
     25 
     26 ;;; Commentary:
     27 
     28 ;;; Code:
     29 
     30  (deftheme simple-dark)
     31  (let ((class '((class color) (min-colors 89)))
     32        (fg1 "#bcbcbc")
     33        (fg2 "#adadad")
     34        (fg3 "#9e9e9e")
     35        (fg4 "#8f8f8f")
     36        (bg1 "#0a0a0a")
     37        (bg2 "#1e1e1e")
     38        (bg3 "#313131")
     39        (bg4 "#454545")
     40        (builtin "#eeeeee")
     41        (keyword "#eeeeee")
     42        (const   "#d0d0d0")
     43        (comment "#585858")
     44        (func    "#d4d4d4")
     45        (str     "#8a8a8a")
     46        (type    "#d4d4d4")
     47        (var     "#d4d4d4")
     48        (warning "#eeeeee")
     49        (warning2 "#d8d8d8"))
     50    (custom-theme-set-faces
     51    'simple-dark
     52         `(default ((,class (:background ,bg1 :foreground ,fg1))))
     53         `(font-lock-builtin-face ((,class (:foreground ,builtin))))
     54         `(font-lock-comment-face ((,class (:foreground ,comment))))
     55 	`(font-lock-negation-char-face ((,class (:foreground ,const))))
     56 	`(font-lock-reference-face ((,class (:foreground ,const))))
     57 	`(font-lock-constant-face ((,class (:foreground ,const))))
     58         `(font-lock-doc-face ((,class (:foreground ,comment))))
     59         `(font-lock-function-name-face ((,class (:foreground ,func ))))
     60         `(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword))))
     61         `(font-lock-string-face ((,class (:foreground ,str))))
     62         `(font-lock-type-face ((,class (:foreground ,type ))))
     63         `(font-lock-variable-name-face ((,class (:foreground ,var))))
     64         `(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2))))
     65         `(term-color-black ((,class (:foreground ,fg2 :background nil))))
     66         `(region ((,class (:background ,fg1 :foreground ,bg1))))
     67         `(highlight ((,class (:foreground ,fg3 :background ,bg3))))
     68 	`(hl-line ((,class (:background  ,bg2))))
     69 	`(fringe ((,class (:background ,bg2 :foreground ,fg4))))
     70 	`(cursor ((,class (:background ,bg3))))
     71         `(isearch ((,class (:bold t :foreground ,warning :background ,bg3))))
     72         `(mode-line ((,class (:box (:line-width 1 :color nil) :bold t :foreground ,fg4 :background ,bg2))))
     73         `(mode-line-inactive ((,class (:box (:line-width 1 :color nil :style pressed-button) :foreground ,var :background ,bg1 :weight normal))))
     74         `(mode-line-buffer-id ((,class (:bold t :foreground ,func :background nil))))
     75 	`(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight bold))))
     76         `(mode-line-emphasis ((,class (:foreground ,fg1))))
     77 	`(vertical-border ((,class (:foreground ,fg3))))
     78         `(minibuffer-prompt ((,class (:bold t :foreground ,keyword))))
     79         `(default-italic ((,class (:italic t))))
     80 	`(link ((,class (:foreground ,const :underline t))))
     81 	`(org-code ((,class (:foreground ,fg2))))
     82 	`(org-hide ((,class (:foreground ,fg4))))
     83         `(org-level-1 ((,class (:bold t :foreground ,fg2 :height 1.1))))
     84         `(org-level-2 ((,class (:bold nil :foreground ,fg3))))
     85         `(org-level-3 ((,class (:bold t :foreground ,fg4))))
     86         `(org-level-4 ((,class (:bold nil :foreground ,bg4))))
     87         `(org-date ((,class (:underline t :foreground ,var) )))
     88         `(org-footnote  ((,class (:underline t :foreground ,fg4))))
     89         `(org-link ((,class (:underline t :foreground ,type ))))
     90         `(org-special-keyword ((,class (:foreground ,func))))
     91         `(org-block ((,class (:foreground ,fg3))))
     92         `(org-quote ((,class (:inherit org-block :slant italic))))
     93         `(org-verse ((,class (:inherit org-block :slant italic))))
     94         `(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold t))))
     95         `(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold t :foreground ,bg4))))
     96         `(org-warning ((,class (:underline t :foreground ,warning))))
     97         `(org-agenda-structure ((,class (:weight bold :foreground ,fg3 :box (:color ,fg4) :background ,bg3))))
     98         `(org-agenda-date ((,class (:foreground ,var :height 1.1 ))))
     99         `(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4))))
    100         `(org-agenda-date-today ((,class (:weight bold :foreground ,keyword :height 1.4))))
    101         `(org-agenda-done ((,class (:foreground ,bg4))))
    102 	`(org-scheduled ((,class (:foreground ,type))))
    103         `(org-scheduled-today ((,class (:foreground ,func :weight bold :height 1.2))))
    104 	`(org-ellipsis ((,class (:foreground ,builtin))))
    105 	`(org-verbatim ((,class (:foreground ,fg4))))
    106         `(org-document-info-keyword ((,class (:foreground ,func))))
    107 	`(font-latex-bold-face ((,class (:foreground ,type))))
    108 	`(font-latex-italic-face ((,class (:foreground ,var :italic t))))
    109 	`(font-latex-string-face ((,class (:foreground ,str))))
    110 	`(font-latex-match-reference-keywords ((,class (:foreground ,const))))
    111 	`(font-latex-match-variable-keywords ((,class (:foreground ,var))))
    112 	`(ido-only-match ((,class (:foreground ,warning))))
    113 	`(org-sexp-date ((,class (:foreground ,fg4))))
    114 	`(ido-first-match ((,class (:foreground ,keyword :bold t))))
    115         `(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t))))
    116 	`(gnus-header-content ((,class (:foreground ,keyword))))
    117 	`(gnus-header-from ((,class (:foreground ,var))))
    118 	`(gnus-header-name ((,class (:foreground ,type))))
    119 	`(gnus-header-subject ((,class (:foreground ,func :bold t))))
    120 	`(mu4e-view-url-number-face ((,class (:foreground ,type))))
    121 	`(mu4e-cited-1-face ((,class (:foreground ,fg2))))
    122 	`(mu4e-cited-7-face ((,class (:foreground ,fg3))))
    123 	`(mu4e-header-marks-face ((,class (:foreground ,type))))
    124 	`(ffap ((,class (:foreground ,fg4))))
    125 	`(js2-private-function-call ((,class (:foreground ,const))))
    126 	`(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
    127 	`(js2-jsdoc-html-tag-name ((,class (:foreground ,var))))
    128 	`(js2-external-variable ((,class (:foreground ,type  ))))
    129         `(js2-function-param ((,class (:foreground ,const))))
    130         `(js2-jsdoc-value ((,class (:foreground ,str))))
    131         `(js2-private-member ((,class (:foreground ,fg3))))
    132         `(js3-warning-face ((,class (:underline ,keyword))))
    133         `(js3-error-face ((,class (:underline ,warning))))
    134         `(js3-external-variable-face ((,class (:foreground ,var))))
    135         `(js3-function-param-face ((,class (:foreground ,fg2))))
    136         `(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
    137         `(js3-instance-member-face ((,class (:foreground ,const))))
    138 	`(warning ((,class (:foreground ,warning))))
    139 	`(ac-completion-face ((,class (:underline t :foreground ,keyword))))
    140 	`(info-quoted-name ((,class (:foreground ,builtin))))
    141 	`(info-string ((,class (:foreground ,str))))
    142 	`(icompletep-determined ((,class :foreground ,builtin)))
    143         `(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
    144         `(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
    145         `(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
    146         `(undo-tree-visualizer-register-face ((,class :foreground ,type)))
    147 	`(slime-repl-inputed-output-face ((,class (:foreground ,type))))
    148         `(trailing-whitespace ((,class :foreground nil :background ,warning)))
    149         `(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1)))
    150         `(rainbow-delimiters-depth-2-face ((,class :foreground ,type)))
    151         `(rainbow-delimiters-depth-3-face ((,class :foreground ,var)))
    152         `(rainbow-delimiters-depth-4-face ((,class :foreground ,const)))
    153         `(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword)))
    154         `(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1)))
    155         `(rainbow-delimiters-depth-7-face ((,class :foreground ,type)))
    156         `(rainbow-delimiters-depth-8-face ((,class :foreground ,var)))
    157         `(magit-item-highlight ((,class :background ,bg3)))
    158         `(magit-section-heading        ((,class (:foreground ,keyword :weight bold))))
    159         `(magit-hunk-heading           ((,class (:background ,bg3))))
    160         `(magit-section-highlight      ((,class (:background ,bg2))))
    161         `(magit-hunk-heading-highlight ((,class (:background ,bg3))))
    162         `(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
    163         `(magit-diffstat-added   ((,class (:foreground ,type))))
    164         `(magit-diffstat-removed ((,class (:foreground ,var))))
    165         `(magit-process-ok ((,class (:foreground ,func :weight bold))))
    166         `(magit-process-ng ((,class (:foreground ,warning :weight bold))))
    167         `(magit-branch ((,class (:foreground ,const :weight bold))))
    168         `(magit-log-author ((,class (:foreground ,fg3))))
    169         `(magit-hash ((,class (:foreground ,fg2))))
    170         `(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3))))
    171         `(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3))))
    172         `(term ((,class (:foreground ,fg1 :background ,bg1))))
    173         `(term-color-black ((,class (:foreground ,bg3 :background ,bg3))))
    174         `(term-color-blue ((,class (:foreground ,func :background ,func))))
    175         `(term-color-red ((,class (:foreground ,keyword :background ,bg3))))
    176         `(term-color-green ((,class (:foreground ,type :background ,bg3))))
    177         `(term-color-yellow ((,class (:foreground ,var :background ,var))))
    178         `(term-color-magenta ((,class (:foreground ,builtin :background ,builtin))))
    179         `(term-color-cyan ((,class (:foreground ,str :background ,str))))
    180         `(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
    181         `(rainbow-delimiters-unmatched-face ((,class :foreground ,warning)))
    182         `(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil))))
    183         `(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight bold))))
    184         `(helm-selection ((,class (:background ,bg2 :underline nil))))
    185         `(helm-selection-line ((,class (:background ,bg2))))
    186         `(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3))))
    187         `(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1))))
    188         `(helm-separator ((,class (:foreground ,type :background ,bg1))))
    189         `(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1))))
    190         `(helm-time-zone-home ((,class (:foreground ,type :background ,bg1))))
    191         `(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1))))
    192         `(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1))))
    193         `(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1))))
    194         `(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1))))
    195         `(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight bold))))
    196         `(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal))))
    197         `(helm-ff-executable ((,class (:foreground ,var :background ,bg1 :weight normal))))
    198         `(helm-ff-invalid-symlink ((,class (:foreground ,warning2 :background ,bg1 :weight bold))))
    199         `(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight bold))))
    200         `(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal))))
    201         `(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1))))
    202         `(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1))))
    203         `(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1))))
    204         `(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1))))
    205         `(helm-grep-match ((,class (:foreground nil :background nil :inherit helm-match))))
    206         `(helm-grep-running ((,class (:foreground ,func :background ,bg1))))
    207         `(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1))))
    208         `(helm-source-go-package-godoc-description ((,class (:foreground ,str))))
    209         `(helm-bookmark-w3m ((,class (:foreground ,type))))
    210         `(company-echo-common ((,class (:foreground ,bg1 :background ,fg1))))
    211         `(company-preview ((,class (:background ,bg1 :foreground ,var))))
    212         `(company-preview-common ((,class (:foreground ,bg2 :foreground ,fg3))))
    213         `(company-preview-search ((,class (:foreground ,type :background ,bg1))))
    214         `(company-scrollbar-bg ((,class (:background ,bg3))))
    215         `(company-scrollbar-fg ((,class (:foreground ,keyword))))
    216         `(company-tooltip ((,class (:foreground ,fg2 :background ,bg1 :bold t))))
    217         `(company-tooltop-annotation ((,class (:foreground ,const))))
    218         `(company-tooltip-common ((,class ( :foreground ,fg3))))
    219         `(company-tooltip-common-selection ((,class (:foreground ,str))))
    220         `(company-tooltip-mouse ((,class (:inherit highlight))))
    221         `(company-tooltip-selection ((,class (:background ,bg3 :foreground ,fg3))))
    222         `(company-template-field ((,class (:inherit region))))
    223         `(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face))))
    224         `(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face))))
    225         `(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face))))
    226         `(web-mode-keyword-face ((,class (:foreground ,keyword))))
    227         `(web-mode-doctype-face ((,class (:inherit ,font-lock-comment-face))))
    228         `(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face))))
    229         `(web-mode-string-face ((,class (:foreground ,str))))
    230         `(web-mode-type-face ((,class (:inherit ,font-lock-type-face))))
    231         `(web-mode-html-attr-name-face ((,class (:foreground ,func))))
    232         `(web-mode-html-attr-value-face ((,class (:foreground ,keyword))))
    233         `(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face))))
    234         `(web-mode-html-tag-face ((,class (:foreground ,builtin))))
    235         `(jde-java-font-lock-package-face ((t (:foreground ,var))))
    236         `(jde-java-font-lock-public-face ((t (:foreground ,keyword))))
    237         `(jde-java-font-lock-private-face ((t (:foreground ,keyword))))
    238         `(jde-java-font-lock-constant-face ((t (:foreground ,const))))
    239         `(jde-java-font-lock-modifier-face ((t (:foreground ,fg2))))
    240         `(jde-jave-font-lock-protected-face ((t (:foreground ,keyword))))
    241         `(jde-java-font-lock-number-face ((t (:foreground ,var))))
    242         `(yas-field-highlight-face ((t (:background ,bg4))))
    243         )
    244   ;; Legacy
    245   (if (< emacs-major-version 22)
    246     (custom-theme-set-faces
    247       'simple-dark
    248       `(show-paren-match-face ((,class (:background ,warning)))) ;; obsoleted in 22.1, removed 2016
    249     )
    250    (custom-theme-set-faces
    251       'simple-dark
    252       `(show-paren-match ((,class (:foreground ,bg1 :background ,str))))
    253       `(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning))))
    254    )
    255   )
    256   ;; emacs >= 26.1
    257   (when (>= emacs-major-version 26)
    258     (custom-theme-set-faces
    259      'simple-dark
    260      `(line-number ((t (:inherit fringe))))
    261      `(line-number-current-line ((t (:inherit fringe :foreground "white" :weight bold))))))
    262   ;; emacs >= 27.1
    263   (when (>= emacs-major-version 27)
    264     (custom-theme-set-faces
    265      'simple-dark
    266      `(tab-line              ((,class (:background ,bg2 :foreground ,fg4))))
    267      `(tab-line-tab          ((,class (:inherit tab-line))))
    268      `(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
    269      `(tab-line-tab-current  ((,class (:background ,bg1 :foreground ,fg1))))
    270      `(tab-line-highlight    ((,class (:background ,bg1 :foreground ,fg2))))))
    271    )
    272 
    273 ;;;###autoload
    274 (when load-file-name
    275   (add-to-list 'custom-theme-load-path
    276                (file-name-as-directory (file-name-directory load-file-name))))
    277 
    278 (provide-theme 'simple-dark)
    279 
    280 ;; Local Variables:
    281 ;; no-byte-compile: t
    282 ;; End:
    283 
    284 ;;; simple-dark-theme.el ends here