From aeb214c2903c7db15492c28e241ce3e4a06832d7 Mon Sep 17 00:00:00 2001 From: rearman Date: Wed, 1 Apr 2026 10:25:43 -0400 Subject: [PATCH] Add and use acme theme Nice pastel colors --- init.el | 19 ++--- re/acme-theme.el | 191 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 9 deletions(-) create mode 100644 re/acme-theme.el diff --git a/init.el b/init.el index 3f3c876..1edb1b9 100644 --- a/init.el +++ b/init.el @@ -169,16 +169,17 @@ (setq bookmark-save-flag 1) ;; GUI Settings -(require '8color-ansi-theme) -(require 'b&w-theme) -(load-theme 'b&w t) +;; (require '8color-ansi-theme) +;; (require 'b&w-theme) +(require 'acme-theme) +(load-theme 'acme t) -(defun swap-theme () - (interactive) - (let* ((theme (car custom-enabled-themes)) - (new (if (equal theme 'b&w) '8color-ansi 'b&w))) - (disable-theme theme) - (load-theme new t))) +;; (defun swap-theme () +;; (interactive) +;; (let* ((theme (car custom-enabled-themes)) +;; (new (if (equal theme 'b&w) '8color-ansi 'b&w))) +;; (disable-theme theme) +;; (load-theme new t))) (menu-bar-mode -1) (tool-bar-mode -1) diff --git a/re/acme-theme.el b/re/acme-theme.el new file mode 100644 index 0000000..3ce9736 --- /dev/null +++ b/re/acme-theme.el @@ -0,0 +1,191 @@ +;;; acme-theme.el --- -*- lexical-binding: t; -*- + +;;; Code: + +(deftheme acme + "Color theme to look like the acme editor from plan9") + +(let ((class '((class color) (min-colors 89))) + (text "#000000") + (bg "#ffffea") + (bar "#eaffff") + (dirty "#8888cc") + (highlight "#eeee9e") + (darkscroll "#99994c") + (red "#ff0000") + (green "#00ff00")) + (custom-theme-set-faces + 'acme +;;;; Special faces. + `(default + ((,class (:foreground ,text :background ,bg)))) + `(error + ((,class (:foreground ,text :underline t)))) + `(warning + ((,class (:foreground ,text)))) + `(success + ((,class (:foreground ,text)))) + `(link + ((,class (:foreground ,text :underline t)))) +;;;; font-lock. + `(font-lock-comment-face + ((,class (:foreground ,text :slant italic :weight light)))) + `(font-lock-string-face + ((,class (:foreground ,text)))) + `(font-lock-builtin-face + ((,class (:foreground ,text)))) + `(font-lock-type-face + ((,class (:foreground ,text)))) + `(font-lock-constant-face + ((,class (:foreground ,text)))) + `(font-lock-function-name-face + ((,class (:foreground ,text)))) + `(font-lock-variable-name-face + ((,class (:foreground ,text)))) + `(font-lock-keyword-face + ((,class (:foreground ,text)))) + `(font-lock-number-face + ((,class (:foreground ,text)))) + `(font-lock-warning-face + ((,class (:foreground ,text :underline nil)))) +;;;; Decorations. + `(vertical-border + ((,class (:foreground ,text)))) + `(scroll-bar + ((,class (:foreground ,text)))) + `(region + ((,class (:background ,highlight :foreground ,text)))) + `(shadow + ((,class (:foreground ,text)))) + `(match + ((,class (:background ,darkscroll)))) + `(highlight + ((,class (:background ,highlight :foreground ,text)))) + `(lazy-highlight + ((,class (:background ,highlight :foreground ,text)))) + `(isearch + ((,class (:foreground ,text :background ,highlight)))) + `(fringe + ((,class (:foreground ,text :background ,bg)))) + `(line-number + ((,class (:foreground ,text :background ,bg)))) + `(line-number-current-line + ((,class (:foreground ,text :background ,darkscroll :weight bold)))) + `(mode-line + ((,class (:foreground ,text :background ,bar :box t)))) + `(mode-line-inactive + ((,class (:foreground ,text :background ,bar :box t)))) + `(mode-line-highlight + ((,class (:box (:line-width 1 :color ,text :style released-button))))) +;;; Org + `(org-document-title + ((,class (:foreground ,text :weight bold)))) + `(org-level-1 + ((,class (:foreground ,text)))) + `(org-level-2 + ((,class (:foreground ,text)))) + `(org-level-3 + ((,class (:foreground ,text)))) + `(org-level-4 + ((,class (:foreground ,text)))) + `(org-level-5 + ((,class (:foreground ,text)))) + `(org-level-6 + ((,class (:foreground ,text)))) + `(org-level-7 + ((,class (:foreground ,text)))) + `(org-level-8 + ((,class (:foreground ,text)))) + `(org-todo + ((,class (:foreground ,red :bold t)))) + `(org-done + ((,class (:foreground ,green :italic t)))) + `(org-headline-done + ((,class (:foreground ,green)))) + `(org-ellipsis + ((,class (:foreground ,text :underline nil)))) + `(org-document-info-keyword + ((,class (:foreground ,text)))) + `(org-special-keyword + ((,class (:foreground ,text)))) + `(org-checkbox + ((,class (:foreground ,text :background ,bg :box nil)))) + `(org-tag + ((,class (:foreground ,text :bold t)))) + `(org-code + ((,class (:foreground ,text)))) + `(org-verbatim + ((,class (:foreground ,text :box (:line-width 1 :color ,text :style released-button))))) + `(org-table + ((,class (:foreground ,text)))) + `(org-formula + ((,class (:foreground ,text)))) + `(org-block + ((,class (:foreground ,text)))) + `(org-block-begin-line + ((,class (:foreground ,text)))) + `(org-block-end-line + ((,class (:foreground ,text)))) + `(org-drawer + ((,class (:foreground ,text)))) + `(org-priority + ((,class (:foreground ,text)))) + `(org-footnote + ((,class (:foreground ,text)))) + `(org-date + ((,class (:foreground ,text)))) + `(org-link + ((,class (:foreground ,text :underline t)))) +;;; Org Agenda + `(header-line + ((,class (:foreground ,text :background ,bg :weight bold)))) + `(org-agenda-structure + ((,class (:foreground ,text :background ,bg :box nil :weight bold)))) + `(org-column + ((,class (:background ,bg)))) + `(org-warning + ((,class (:foreground ,text)))) + `(org-agenda-done + ((,class (:foreground ,text :italic t)))) + `(org-time-grid + ((,class (:foreground ,text :bold t)))) + `(calendar-weekday-header + ((,class (:foreground ,text)))) + `(org-agenda-calendar-event + ((,class (:foreground ,text)))) + `(org-agenda-clocking + ((,class (:foreground ,bg :background ,text)))) + `(org-agenda-date + ((,class (:foreground ,text :background ,bg :box nil :weight normal)))) + `(org-agenda-date-weekend + ((,class (:foreground ,text :background ,bg :box nil :weight normal :underline nil)))) + `(org-agenda-date-today + ((,class (:foreground ,text :background ,bg :box nil :weight normal :slant normal :inverse-video nil)))) + `(org-upcoming-distant-deadline + ((,class (:foreground ,text :italic t)))) + `(org-upcoming-deadline + ((,class (:foreground ,text :italic t)))) + `(org-imminent-deadline + ((,class (:foreground ,text :weight bold)))) + `(org-scheduled + ((,class (:foreground ,text)))) + `(org-scheduled-today + ((,class (:foreground ,text)))) + `(org-scheduled-previously + ((,class (:foreground ,text)))) +;;; Misc. other packages + `(corfu-default + ((,class (:foreground ,text :background ,bg)))) + `(corfu-current + ((,class (:foreground ,text :background ,highlight)))) + `(dired-ignored + ((,class (:foreground ,text)))))) + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'acme) +(provide 'acme-theme) +;;; acme-theme.el ends here -- 2.39.5