├── screenshot-1.png ├── screenshot-2.png ├── README.org ├── LICENSE └── acme-theme.el /screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nnoodle/emacs-acme-theme/HEAD/screenshot-1.png -------------------------------------------------------------------------------- /screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nnoodle/emacs-acme-theme/HEAD/screenshot-2.png -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+AUTHOR: Noodles! 2 | 3 | * emacs-acme-theme 4 | ~acme-theme~ is an Emacs theme inspired by the [[http://acme.cat-v.org/][Acme]]/[[http://doc.cat-v.org/plan_9/][Plan 9]] motif. 5 | Outside of a few exceptions, it has no syntax highlighting by default. 6 | 7 | [[./screenshot-1.png]] 8 | 9 | ** Installation 10 | Download ~emacs-acme-theme.el~ and select it with ~M-x package-install-file RET~. 11 | Now you should be able to load ~acme~ with ~load-theme~. 12 | 13 | If you use ~use-package~, add something like this to your initialization file. 14 | #+BEGIN_SRC emacs-lisp 15 | (use-package acme-theme 16 | :ensure t 17 | :defer t 18 | :init 19 | ;; variables to configure 20 | (setq acme-theme-gray-rainbow-delimiters nil)) 21 | #+END_SRC 22 | ** Customization 23 | See ~M-x customize-group RET acme-theme RET~ to see variables that you 24 | can customize. 25 | ** Screenshot 26 | Here is a screenshot of the Acme theme with ~acme-theme-more-syntax-hl~ set to ~t~. 27 | 28 | [[./screenshot-2.png]] 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Noodles! 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /acme-theme.el: -------------------------------------------------------------------------------- 1 | ;;; acme-theme.el --- An Acme-esque Emacs theme -*- lexical-binding:t; -*- 2 | 3 | ;; Copyright (C) 2019 Noodles! 4 | 5 | ;; Author: Noodles! 6 | ;; Version: 0.2.0 7 | ;; Keywords: themes 8 | ;; URL: https://github.com/nnoodle/emacs-acme-theme 9 | 10 | ;; This file is not part of GNU Emacs. 11 | 12 | ;; MIT License 13 | 14 | ;; Permission is hereby granted, free of charge, to any person obtaining 15 | ;; a copy of this software and associated documentation files (the 16 | ;; "Software"), to deal in the Software without restriction, including 17 | ;; without limitation the rights to use, copy, modify, merge, publish, 18 | ;; distribute, sublicense, and/or sell copies of the Software, and to 19 | ;; permit persons to whom the Software is furnished to do so, subject to 20 | ;; the following conditions: 21 | 22 | ;; The above copyright notice and this permission notice shall be 23 | ;; included in all copies or substantial portions of the Software. 24 | 25 | ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | ;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | ;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | ;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | 33 | ;;; Commentary: 34 | 35 | ;; An Emacs theme that tries to be similar to the Acme (and Plan 9) motif. 36 | 37 | ;; 38 | 39 | ;;; TODO: 40 | ;; - incorperate acme-style modified buffer indicators 41 | ;; - figure out whether or not link highlighting is a good thing 42 | 43 | ;;; Code: 44 | 45 | (deftheme acme 46 | "A theme similar to the one used in the Acme editor.") 47 | 48 | (defgroup acme-theme nil 49 | "The Acme theme" 50 | :group 'faces 51 | :prefix "acme-theme-") 52 | 53 | (defcustom acme-theme-more-syntax-hl nil 54 | "Non-nil enables just a bit more syntax highlighting. 55 | 56 | \"Syntax highlighting is juvenile. When I was a child, I was taught 57 | arithmetic using colored rods 58 | \(http://en.wikipedia.org/wiki/Cuisenaire_rods). I grew up and today I 59 | use monochromatic numerals.\" 60 | 61 | - Rob \"monochromatic is not problematic\" Pike 62 | https://groups.google.com/d/msg/golang-nuts/hJHCAaiL0so/kG3BHV6QFfIJ" 63 | :type 'boolean 64 | :group 'acme-theme) 65 | 66 | (defcustom acme-theme-gray-rainbow-delimiters nil 67 | "Non-nil makes `rainbow-delimiters' gray." 68 | :type 'boolean 69 | :group 'rainbow-delimiters 70 | :group 'acme-theme) 71 | 72 | (defcustom acme-theme-white-backgrounds t 73 | "Non-nil hooks `acme-theme-white-background' to certain modes." 74 | :type 'boolean 75 | :group 'acme-theme) 76 | 77 | (defcustom acme-theme-change-defaults t 78 | "Non-nil changes some defaults to be more like Acme." 79 | :type 'boolean 80 | :group 'acme-theme) 81 | 82 | (defvar acme-theme-colors-alist 83 | '((black . "#000000") ; foreground 84 | (gray-dark . "#888888") 85 | (gray . "#cccccc") 86 | (gray-pale . "#eeeeee") 87 | (white . "#ffffff") ; empty column 88 | (frost-deep . "#8888cc") ; corner 89 | (frost-dark . "#55aaaa") ; tagbar highlight 90 | (frost . "#9eeeee") 91 | (frost-pale . "#eaffff") ; tagbar 92 | (yellow-dark . "#99994c") ; scrollbar 93 | (yellow . "#eeee9e") ; main highlight 94 | (yellow-semi . "#ffffcc") 95 | (yellow-pale . "#ffffea") ; background 96 | (red-deep . "#aa0000") ; mouse-2 highlight 97 | (red-dark . "#bb5d5d") 98 | (red . "#ffaaaa") 99 | (red-pale . "#ffeaea") 100 | (green-deep . "#006600") ; mouse-3 highlight 101 | (green-dark . "#448844") 102 | (green . "#88cc88") 103 | (green-pale . "#eaffea") 104 | (blue-deep . "#000099") ; tagbox 105 | (blue-dark . "#0088cc") 106 | (blue . "#00aaff") 107 | (blue-pale . "#c0eaff")) 108 | "Colors from Acme & Plan9.") 109 | 110 | (defmacro acme-theme-with-color-variables (&rest body) 111 | "Bind all colors defined in `acme-colors-alist' around BODY. 112 | Also bind `class' to ((class color) (min-colors 89))." 113 | (declare (indent 0)) 114 | `(let ((class '((class color) (min-colors 89))) 115 | ,@(mapcar (lambda (cons) (list (car cons) (cdr cons))) 116 | acme-theme-colors-alist)) 117 | ,@body)) 118 | 119 | (defun acme-theme-alternative (face &optional alt) 120 | "Return FACE if `acme-theme-more-syntax-hl' is t, otherwise return default or ALT." 121 | (if acme-theme-more-syntax-hl face 122 | (or alt '((t nil))))) 123 | 124 | (defun acme-theme-rainbow-delimiters (color) 125 | "Return rainbow-delimiters face with COLOR or gray." 126 | `((t (:inherit rainbow-delimiters-base-face :foreground 127 | ,(acme-theme-with-color-variables 128 | (if acme-theme-gray-rainbow-delimiters 129 | gray-dark color)))))) 130 | 131 | (defun acme-theme-white-background (&optional bg) 132 | "Use a white background if BG is nil, otherwise use BG." 133 | (interactive) 134 | (when (or (and acme-theme-white-backgrounds (memq 'acme custom-enabled-themes)) 135 | (called-interactively-p)) 136 | (acme-theme-with-color-variables 137 | (let ((bg (or bg white))) 138 | (face-remap-add-relative 'default :background bg) 139 | (face-remap-add-relative 'highlight :background gray-pale) 140 | (face-remap-add-relative 'region :background gray) 141 | (face-remap-add-relative 'fringe :foreground gray-dark :background bg) 142 | (face-remap-add-relative 'scroll-bar :foreground bg :background gray-dark))))) 143 | 144 | (acme-theme-with-color-variables 145 | ;; basic faces additional to faces.el 146 | (defface acme-theme-note 147 | `((t (:underline (:color ,green :style wave)))) 148 | "Face for linter notes." 149 | :group 'acme-theme) 150 | 151 | (defface acme-theme-warning 152 | `((t (:underline (:color ,blue :style wave)))) 153 | "Face for linter warnings." 154 | :group 'acme-theme) 155 | 156 | (defface acme-theme-error 157 | `((t (:underline (:color ,red :style wave)))) 158 | "Face for linter errors." 159 | :group 'acme-theme) 160 | 161 | (custom-theme-set-faces 162 | 'acme 163 | ;; basic 164 | `(default ((t (:foreground ,black :background ,yellow-pale)))) 165 | `(success ((t (:foreground ,green)))) 166 | `(warning ((t (:foreground ,red-dark)))) 167 | `(error ((t (:foreground ,red-deep)))) 168 | `(homoglyph ,(acme-theme-alternative `((t :foreground ,frost)))) 169 | `(escape-glyph ,(acme-theme-alternative `((t :foreground ,frost)))) 170 | `(link ((t (:foreground ,black :underline t)))) 171 | `(link-visited ((t (:inherit link :slant italic)))) 172 | `(highlight ((t (:background ,yellow-semi)))) 173 | `(region ((t (:background ,yellow)))) 174 | `(cursor ((t (:background ,black)))) 175 | `(fringe ((t (:foreground ,yellow-dark :background ,yellow-pale)))) 176 | `(scroll-bar ((t (:foreground ,yellow-pale :background ,yellow-dark)))) 177 | `(hl-line ((t (:inherit highlight)))) 178 | `(vertical-border ((t (:background ,black)))) 179 | `(secondary-selection ((t (:background ,red-deep :foreground ,white)))) 180 | `(lazy-highlight ((t (:background ,green-dark :foreground ,white)))) 181 | `(query-replace ((t (:inherit region)))) 182 | `(shadow ,(acme-theme-alternative `((t (:foreground ,gray-dark))))) 183 | `(minibuffer-prompt ((t nil))) 184 | `(tooltip ((t (:foreground ,black :background ,green-pale)))) 185 | 186 | ;; window-divider 187 | `(window-divider ((t (:inherit default)))) 188 | `(window-divider-first-pixel ((t (:inherit window-divider)))) 189 | `(window-divider-last-pixel ((t (:inherit window-divider)))) 190 | 191 | ;; line numbers 192 | `(line-number ((t (:inherit fringe)))) 193 | `(line-number-current-line ((t (:inherit scroll-bar)))) 194 | 195 | ;; mode-line 196 | `(mode-line ((t (:foreground ,black :background ,frost-pale 197 | :box (:color ,frost-deep))))) 198 | `(mode-line-inactive ((t (:inherit mode-line)))) 199 | `(mode-line-emphasis ((t (:weight bold)))) 200 | `(mode-line-buffer-id ((t nil))) 201 | `(mode-line-highlight ((t nil))) 202 | `(compilation-mode-line-exit ((t (:weight semi-bold :inherit compilation-info)))) 203 | `(compilation-mode-line-fail ((t (:weight semi-bold :inherit compilation-error)))) 204 | 205 | ;; header-line 206 | `(header-line ((t (:inherit mode-line)))) 207 | `(header-line-highlight ((t (:inherit mode-line)))) 208 | 209 | ;; syntax highlighting :^) 210 | `(font-lock-builtin-face ((t nil))) 211 | `(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face)))) 212 | `(font-lock-comment-face ,(acme-theme-alternative `((t (:foreground ,gray-dark))))) 213 | `(font-lock-constant-face ((t nil))) 214 | `(font-lock-doc-face ((t (:inherit font-lock-string-face)))) 215 | `(font-lock-function-name-face ((t nil))) 216 | `(font-lock-keyword-face ((t nil))) 217 | `(font-lock-negation-char-face ((t nil))) 218 | `(font-lock-preprocessor-face ((t nil))) 219 | `(font-lock-regexp-grouping-backslash ((t nil))) 220 | `(font-lock-regexp-grouping-construct ((t nil))) 221 | `(font-lock-string-face ,(acme-theme-alternative `((t (:foreground ,green-dark))))) 222 | `(font-lock-type-face ((t nil))) 223 | `(font-lock-variable-name-face ((t nil))) 224 | `(font-lock-warning-face ((t nil))) 225 | 226 | ;; isearch 227 | `(isearch ((t (:inherit region)))) 228 | `(isearch-fail ((t (:background ,red)))) 229 | 230 | ;; ido 231 | `(ido-only-match ((t (:weight bold)))) 232 | `(ido-subdir ((t nil))) 233 | `(ido-virtual ((t (:slant italic)))) 234 | 235 | ;; ivy/counsel 236 | `(ivy-confirm-face ((t (:inherit minibuffer-prompt :foreground ,green)))) 237 | `(ivy-current-match ((t (:inherit region)))) 238 | `(ivy-grep-info ((t nil))) 239 | `(ivy-highlight-face ((t (:inherit font-lock-builtin-face)))) 240 | `(ivy-match-required-face ((t (:inherit minibuffer-prompt :foreground ,red-dark)))) 241 | `(ivy-minibuffer-match-face-1 ((t (:inherit highlight)))) 242 | `(ivy-minibuffer-match-face-2 ((t (:inherit ivy-minibuffer-match-face-1 :background ,yellow :weight semi-bold)))) 243 | `(ivy-minibuffer-match-face-3 ((t (:inherit ivy-minibuffer-match-face-2)))) 244 | `(ivy-minibuffer-match-face-4 ((t (:inherit ivy-minibuffer-match-face-3)))) 245 | `(ivy-minibuffer-match-highlight ((t (:inherit region)))) 246 | `(ivy-modified-buffer ((t nil))) 247 | `(ivy-remote ((t nil))) 248 | `(ivy-virtual ((t (:inherit font-lock-builtin-face :slant italic)))) 249 | `(counsel-key-binding ((t nil))) 250 | 251 | ;; swiper 252 | `(swiper-line-face ((t (:inherit highlight)))) 253 | `(swiper-match-face-1 ((t (:inherit ivy-minibuffer-match-face-1)))) 254 | `(swiper-match-face-2 ((t (:inherit ivy-minibuffer-match-face-2)))) 255 | `(swiper-match-face-3 ((t (:inherit ivy-minibuffer-match-face-3)))) 256 | `(swiper-match-face-4 ((t (:inherit ivy-minibuffer-match-face-4)))) 257 | 258 | ;; company-mode 259 | `(company-preview ((t (:foreground ,gray-dark)))) 260 | `(company-preview-common ((t (:foreground ,gray-dark)))) 261 | `(company-scrollbar-bg ((t (:background ,green)))) 262 | `(company-scrollbar-fg ((t (:background ,green-dark)))) 263 | `(company-tooltip ((t (:foreground ,black :background ,green-pale)))) 264 | `(company-tooltip-annotation ((t (:foreground ,blue-deep)))) 265 | `(company-tooltip-common ((t (:weight bold)))) 266 | `(company-tooltip-common-selection ((t (:inherit company-tooltip-common)))) 267 | `(company-tooltip-mouse ((t (:inherit company-tooltip-selection)))) 268 | `(company-tooltip-selection ((t (:background ,green-dark :foreground ,green-pale)))) 269 | 270 | ;; show-paren 271 | `(show-paren-match ((t (:underline ,(if acme-theme-gray-rainbow-delimiters black t))))) 272 | `(show-paren-mismatch ((t (:underline (:color ,red-deep :style wave))))) 273 | 274 | ;; rainbow-delimiters 275 | `(rainbow-delimiters-depth-1-face ,(acme-theme-rainbow-delimiters black)) 276 | `(rainbow-delimiters-depth-2-face ,(acme-theme-rainbow-delimiters gray-dark)) 277 | `(rainbow-delimiters-depth-3-face ,(acme-theme-rainbow-delimiters blue-deep)) 278 | `(rainbow-delimiters-depth-4-face ,(acme-theme-rainbow-delimiters blue-dark)) 279 | `(rainbow-delimiters-depth-5-face ,(acme-theme-rainbow-delimiters green-deep)) 280 | `(rainbow-delimiters-depth-6-face ,(acme-theme-rainbow-delimiters green-dark)) 281 | `(rainbow-delimiters-depth-7-face ,(acme-theme-rainbow-delimiters red-deep)) 282 | `(rainbow-delimiters-depth-8-face ,(acme-theme-rainbow-delimiters red-dark)) 283 | `(rainbow-delimiters-unmatched-face ((t (:inherit (rainbow-delimiters-base-face show-paren-mismatch))))) 284 | 285 | ;; whitespace 286 | `(trailing-whitespace ((t (:background ,red-pale)))) 287 | `(whitespace-newline ((t (:inherit whitespace-tab)))) 288 | `(whitespace-space ((t (:inherit whitespace-tab)))) 289 | `(whitespace-tab ((t (:foreground ,gray)))) 290 | 291 | ;; dired 292 | `(dired-perm-write ((t nil))) 293 | 294 | ;; proced 295 | `(proced-sort-header ((t (:inherit mode-line :weight bold)))) 296 | 297 | ;; info-mode 298 | `(info-header-node ((t (:slant italic)))) 299 | `(info-index-match ((t (:inherit region)))) 300 | `(info-menu-star ((t nil))) 301 | `(info-node ((t (:slant italic)))) 302 | 303 | ;; eww 304 | `(eww-form-checkbox ((t (:inherit eww-form-submit)))) 305 | `(eww-form-file ((t (:inherit eww-form-submit)))) 306 | `(eww-form-select ((t (:inherit eww-form-submit)))) 307 | `(eww-form-submit ((t (:foreground ,black :background ,frost-pale :box (:line-width 1 :style released-button))))) 308 | `(eww-form-text ((t (:inherit eww-form-submit)))) 309 | `(eww-form-textarea ((t (:inherit eww-form-text)))) 310 | `(eww-invalid-certificate ((t nil))) 311 | `(eww-valid-certificate ((t nil))) 312 | 313 | ;; erc 314 | `(erc-action-face ((t (:slant italic)))) 315 | `(erc-current-nick-face ((t (:underline t)))) 316 | `(erc-fool-face ((t (:inherit shadow :slant italic)))) 317 | `(erc-header-line ((t (:inherit mode-line)))) 318 | `(erc-input-face ((t (:inherit shadow)))) 319 | `(erc-keyword-face ((t (:background ,green-pale :weight bold :underline t)))) 320 | `(erc-my-nick-face ((t nil))) 321 | `(erc-nick-msg-face ((t (:slant italic)))) 322 | `(erc-notice-face ((t (:weight semi-bold)))) 323 | `(erc-pal-face ((t nil))) 324 | `(erc-prompt-face ((t (:weight bold)))) 325 | `(erc-timestamp-face ((t (:weight semi-bold)))) 326 | 327 | ;; message-mode 328 | `(message-cited-text ((t nil))) 329 | `(message-header-cc ((t nil))) 330 | `(message-header-name ((t (:weight semi-bold)))) 331 | `(message-header-newsgroups ((t nil))) 332 | `(message-header-other ((t nil))) 333 | `(message-header-subject ((t nil))) 334 | `(message-header-to ((t nil))) 335 | `(message-header-xheader ((t nil))) 336 | `(message-mml ((t nil))) 337 | `(message-separator ((t nil))) 338 | 339 | ;; elfeed 340 | `(elfeed-log-debug-level-face ((t nil))) 341 | `(elfeed-log-error-level-face ((t nil))) 342 | `(elfeed-log-info-level-face ((t nil))) 343 | `(elfeed-log-warn-level-face ((t nil))) 344 | `(elfeed-search-date-face ((t nil))) 345 | `(elfeed-search-feed-face ((t nil))) 346 | `(elfeed-search-tag-face ((t nil))) 347 | `(elfeed-search-title-face ((t nil))) 348 | 349 | ;; notmuch 350 | `(notmuch-crypto-part-header ((t nil))) 351 | `(notmuch-crypto-signature-bad-key ((t (:weight semi-bold)))) 352 | `(notmuch-crypto-signature-good ((t (:weight semi-bold)))) 353 | `(notmuch-crypto-signature-good-key ((t (:weight semi-bold)))) 354 | `(notmuch-crypto-signature-unknown ((t (:weight semi-bold)))) 355 | `(notmuch-hello-logo-background ((t nil))) 356 | `(notmuch-message-summary-face ((t (:inherit mode-line)))) 357 | `(notmuch-tag-added ((t (:underline ,black)))) 358 | `(notmuch-tag-deleted ((t (:strike-through ,black)))) 359 | `(notmuch-tag-face ((t nil))) 360 | `(notmuch-tag-flagged ((t (:weight bold)))) 361 | `(notmuch-tag-unread ((t (:foreground ,red-deep :weight bold)))) ; too important 362 | 363 | ;; outline 364 | `(outline-level-1 ((t nil))) 365 | `(outline-level-2 ((t nil))) 366 | `(outline-level-3 ((t nil))) 367 | `(outline-level-4 ((t nil))) 368 | `(outline-level-5 ((t nil))) 369 | `(outline-level-6 ((t nil))) 370 | `(outline-level-7 ((t nil))) 371 | `(outline-level-8 ((t nil))) 372 | 373 | ;; org 374 | `(org-block ((t (:inherit org-code)))) 375 | `(org-code ((t (:inherit (shadow fixed-pitch-serif))))) 376 | `(org-date ((t (:inherit fixed-pitch-serif)))) 377 | `(org-document-info ((t (:inherit org-meta-line)))) 378 | `(org-document-info-keyword ((t (:inherit org-document-info)))) 379 | `(org-document-title ((t nil))) 380 | `(org-done ((t nil))) 381 | `(org-ellipsis ((t nil))) 382 | `(org-footnote ((t nil))) 383 | `(org-hide ((t (:foreground ,yellow-pale)))) 384 | `(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch))))) 385 | `(org-priority ((t (:inherit fixed-pitch)))) 386 | `(org-table ((t (:inherit fixed-pitch)))) 387 | `(org-tag ((t (:inherit fixed-pitch)))) 388 | `(org-todo ((t nil))) 389 | 390 | ;; eshell 391 | `(eshell-ls-archive ((t nil))) 392 | `(eshell-ls-backup ((t nil))) 393 | `(eshell-ls-clutter ((t nil))) 394 | `(eshell-ls-directory ((t nil))) 395 | `(eshell-ls-executable ((t nil))) 396 | `(eshell-ls-missing ((t nil))) 397 | `(eshell-ls-product ((t nil))) 398 | `(eshell-ls-special ((t nil))) 399 | `(eshell-ls-symlink ((t nil))) 400 | `(eshell-ls-unreadable ((t nil))) 401 | `(eshell-prompt ((t nil))) 402 | 403 | ;; sh-mode 404 | `(sh-heredoc ((t (:inherit shadow)))) 405 | `(sh-quoted-exec ((t nil))) 406 | 407 | ;; comint 408 | `(comint-highlight-input ((t nil))) 409 | 410 | ;; term 411 | `(term ((t ,(when acme-theme-white-backgrounds `(:background ,white))))) 412 | `(term-color-black ((t nil))) 413 | `(term-color-blue ((t nil))) 414 | `(term-color-cyan ((t nil))) 415 | `(term-color-green ((t nil))) 416 | `(term-color-magenta ((t nil))) 417 | `(term-color-red ((t nil))) 418 | `(term-color-white ((t nil))) 419 | `(term-color-yellow ((t nil))) 420 | 421 | ;; magit 422 | `(magit-diff-context-highlight ((t (:inherit magit-section-highlight)))) 423 | `(magit-section-highlight ((t (:inherit highlight)))) 424 | 425 | ;; git-gutter 426 | `(git-gutter:added ((t (:inherit fringe)))) 427 | `(git-gutter:deleted ((t (:inherit fringe)))) 428 | `(git-gutter:modified ((t (:inherit fringe)))) 429 | 430 | ;; flymake 431 | `(flymake-note ((t (:inherit acme-theme-note)))) 432 | `(flymake-warning ((t (:inherit acme-theme-warning)))) 433 | `(flymake-error ((t (:inherit acme-theme-error)))) 434 | 435 | ;; flycheck 436 | `(flycheck-info ((t (:inherit acme-theme-note)))) 437 | `(flycheck-warning ((t (:inherit acme-theme-warning)))) 438 | `(flycheck-error ((t (:inherit acme-theme-error)))) 439 | 440 | ;; sly 441 | `(sly-mrepl-prompt-face ((t (:weight semi-bold)))) 442 | `(sly-mrepl-output-face ((t nil))) 443 | `(sly-note-face ((t (:inherit acme-theme-note)))) 444 | `(sly-style-warning-face ((t (:inherit acme-theme-note)))) 445 | `(sly-warning-face ((t (:inherit acme-theme-warning)))) 446 | `(sly-error-face ((t (:inherit acme-theme-error)))) 447 | `(sly-mode-line ((t nil))) 448 | )) 449 | 450 | (acme-theme-with-color-variables 451 | (custom-theme-set-variables 452 | 'acme 453 | `(exwm-floating-border-color ,frost) 454 | `(rainbow-delimiters-max-face-count ,(if acme-theme-gray-rainbow-delimiters 1 8)) 455 | `(ansi-color-names-vector 456 | ,(if acme-theme-more-syntax-hl 457 | [,black ,red ,green ,red-pale ,blue-dark ,frost-deep ,frost ,black] 458 | [,black ,black ,black ,black ,black ,black ,black ,black])) 459 | `(tooltip-frame-parameters 460 | (quote ((name . "tooltip") 461 | (internal-border-width . 2) 462 | (border-width . 2) 463 | (no-special-glyphs . t) 464 | (border-color . ,green)))) 465 | `(pdf-view-midnight-colors 466 | (cons ,gray-pale ,black)) 467 | `(pdf-annot-default-annotation-properties 468 | (quote ((t (label . ,user-full-name)) 469 | (text (icon . "Note") 470 | (color . ,black)) 471 | (highlight (color . ,yellow)) 472 | (squiggly (color . ,red-deep)) 473 | (strike-out(color . ,black)) 474 | (underline (color . ,red-deep)))))) 475 | 476 | (when acme-theme-change-defaults 477 | ;; this is awkward to undo. 478 | ;; (setenv "PS1" "% ") 479 | ;; (setenv "PS2" "\t") 480 | (custom-theme-set-variables 481 | 'acme 482 | ;; acme-like behavior 483 | ;; '(blink-cursor-mode 0) 484 | ;; '(cursor-type (quote bar)) 485 | ;; '(scroll-bar-mode (quote left)) 486 | '(delete-active-region 1) 487 | ;; on plan9port, the prompt appears as `% ', while on 9front, 488 | ;; this appears something like `term% ' 489 | '(eshell-prompt-function 490 | (lambda () "% ")) 491 | '(eshell-prompt-regexp "^% ") 492 | '(mouse-autoselect-window t) 493 | '(list-directory-brief-switches "-aCF") 494 | '(window-divider-default-right-width 2) 495 | '(window-divider-default-bottom-width 2) 496 | '(x-gtk-use-system-tooltips nil)))) 497 | 498 | (acme-theme-with-color-variables 499 | (when acme-theme-white-backgrounds 500 | ;; similar to empty space in acme 501 | (add-hook 'lisp-interaction-mode-hook #'acme-theme-white-background) 502 | ;; like right-click context menus 503 | (add-hook 'completion-list-mode-hook (lambda () (acme-theme-white-background green-pale))) 504 | (add-hook 'magit-popup-mode-hook (lambda () (acme-theme-white-background green-pale))) 505 | ;; kinda like the sam(1) 506 | (add-hook 'evil-command-window-mode-hook (lambda () (acme-theme-white-background frost-pale))) 507 | ;; like 9term(1) 508 | (add-hook 'shell-mode-hook #'acme-theme-white-background) 509 | (add-hook 'term-mode-hook #'acme-theme-white-background) 510 | ;; (add-hook 'eshell-mode-hook #'acme-theme-white-background) ; like win(1) 511 | ;; like page(1) 512 | (add-hook 'image-mode-hook (lambda () (acme-theme-white-background gray-dark))) 513 | (add-hook 'doc-view-mode-hook (lambda () (acme-theme-white-background gray-dark))) 514 | (add-hook 'pdf-view-mode-hook (lambda () (acme-theme-white-background gray-dark))) 515 | ;; like plot(1) / chart(1) 516 | (add-hook 'chart-mode-hook #'acme-theme-white-background) 517 | ;; like stats(1) (but without the fancy graphs) 518 | (add-hook 'proced-mode-hook #'acme-theme-white-background) 519 | ;; like gping(1) 520 | (add-hook 'net-utils-mode-hook #'acme-theme-white-background) 521 | ;; like mothra(1) 522 | (add-hook 'eww-mode-hook #'acme-theme-white-background) 523 | ;; looks like faces(1) 524 | (add-hook 'calendar-mode-hook (lambda () (acme-theme-white-background frost-pale))) 525 | (add-hook 'display-time-world-mode-hook (lambda () (acme-theme-white-background frost-pale))) 526 | )) 527 | 528 | ;;; patch `tooltip-show' to allow customizing border-color 529 | (define-advice tooltip-show (:override (text &optional use-echo-area) dont-ignore) 530 | "Show a tooltip window displaying TEXT. 531 | 532 | Text larger than `x-max-tooltip-size' is clipped. 533 | 534 | If the alist in `tooltip-frame-parameters' includes `left' and `top' 535 | parameters, they determine the x and y position where the tooltip 536 | is displayed. Otherwise, the tooltip pops at offsets specified by 537 | `tooltip-x-offset' and `tooltip-y-offset' from the current mouse 538 | position. 539 | 540 | Optional second arg USE-ECHO-AREA non-nil means to show tooltip 541 | in echo area." 542 | (if use-echo-area 543 | (tooltip-show-help-non-mode text) 544 | (condition-case error 545 | (let ((params (copy-sequence tooltip-frame-parameters)) 546 | (fg (face-attribute 'tooltip :foreground)) 547 | (bg (face-attribute 'tooltip :background))) 548 | (when (stringp fg) 549 | (setf (alist-get 'foreground-color params) (or (alist-get 'foreground-color params) fg)) 550 | (setf (alist-get 'border-color params) (or (alist-get 'border-color params) fg))) 551 | (when (stringp bg) 552 | (setf (alist-get 'background-color params) (or (alist-get 'background-color params) bg))) 553 | (x-show-tip (propertize text 'face 'tooltip) 554 | (selected-frame) 555 | params 556 | tooltip-hide-delay 557 | tooltip-x-offset 558 | tooltip-y-offset)) 559 | (error 560 | (message "Error while displaying tooltip: %s" error) 561 | (sit-for 1) 562 | (message "%s" text))))) 563 | 564 | (run-hooks 'acme-theme-hook) 565 | (provide-theme 'acme) 566 | ;;; acme-theme.el ends here 567 | --------------------------------------------------------------------------------