--- /dev/null
+;;; wobow-themes.el --- Fully monochromatic color themes -*- lexical-binding: t; -*-
+
+;;; Code:
+
+(defconst wobow-themes-colors
+ '((bow . ((background . "#ffffff")
+ (foreground . "#000000")
+ (weak . "#000000")
+ (weaker . "#000000")
+ (weakest . "#000000")
+ (highlight . "#ffffff")
+ (secondary . "#ffffff")
+ (warning . "#000000")
+ (success . "#000000")
+ (string . "#000000")))
+ (wob . ((background . "#000000")
+ (foreground . "#ffffff")
+ (weak . "#ffffff")
+ (weaker . "#ffffff")
+ (weakest . "#ffffff")
+ (highlight . "#000000")
+ (secondary . "#000000")
+ (warning . "#ffffff")
+ (success . "#ffffff")
+ (string . "#ffffff")))))
+
+(defmacro wobow-themes--variant-with-colors (variant &rest body)
+ "Execute BODY in a scope where the different colors for given VARIANT is bound."
+ `(let* ((colors (or (cdr (assoc ,variant wobow-themes-colors))
+ (error "No such theme variant")))
+ (background (cdr (assoc 'background colors)))
+ (foreground (cdr (assoc 'foreground colors)))
+ (weak (cdr (assoc 'weak colors)))
+ (weaker (cdr (assoc 'weaker colors)))
+ (weakest (cdr (assoc 'weakest colors)))
+ (highlight (cdr (assoc 'highlight colors)))
+ (secondary (cdr (assoc 'secondary colors)))
+ (warning (cdr (assoc 'warning colors)))
+ (success (cdr (assoc 'success colors)))
+ (string (cdr (assoc 'string colors))))
+ ,@body))
+
+(defmacro wobow-themes--faces-spec ()
+ "Provide the faces specification."
+ (quote
+ (mapcar
+ (lambda (entry) (list (car entry) `((t ,@(cdr entry)))))
+ `(
+
+ ;; default
+ (default (:background ,background :foreground ,foreground))
+ (fringe (:background ,background :foreground ,foreground))
+ (region (:inverse-video t))
+ (highlight (:inverse-video t))
+ (secondary-selection (:inverse-video t))
+ (shadow (:foreground ,foreground))
+ (show-paren-match (:bold t))
+ (show-paren-mismatch (:inverse-video t :bold t))
+ (minibuffer-prompt (:background ,background :foreground ,foreground :weight bold))
+ (isearch (:inverse-video t :bold t))
+ (lazy-highlight (:background ,background :foreground ,foreground))
+ (link (:underline t))
+
+ ;; mode line
+ (mode-line (:box (:line-width -1 :color ,foreground)
+ :background ,background :foreground ,foreground :inverse-video t))
+
+ (mode-line-inactive (:box (:line-width -1 :color ,foreground)
+ :background ,background :foreground ,foreground))
+
+ ;; font lock
+ (font-lock-keyword-face (:bold t))
+ (font-lock-function-name-face (:bold t))
+ (font-lock-variable-name-face (:foreground ,foreground))
+ (font-lock-warning-face (:foreground ,foreground :underline (:color ,warning :inverse-video t :style wave)))
+ (font-lock-builtin-face (:bold t))
+ (font-lock-variable-name-face (:foreground ,foreground :italic t))
+ (font-lock-constant-face (:bold t :italic t))
+ (font-lock-type-face (:italic t))
+ (font-lock-preprocessor-face (:italic t))
+ (font-lock-comment-face (:foreground ,foreground :italic t))
+ (font-lock-string-face (:foreground ,foreground))
+ (font-lock-doc-face (:inherit font-lock-comment-face))
+ (line-number (:foreground ,foreground))
+ (linum (:inherit line-number))
+ (vertical-border (:foreground ,weaker))
+ (scroll-bar (:background ,background :foreground ,foreground :inverse-video t))
+
+ ;; eshell
+ (eshell-prompt (:foreground ,foreground :bold t))
+ (eshell-ls-directory (:foreground ,foreground :bold t))
+ (eshell-ls-archive (:inherit eshell-ls-unreadable))
+ (eshell-ls-backup (:inherit eshell-ls-unreadable))
+ (eshell-ls-clutter (:inherit eshell-ls-unreadable))
+ (eshell-ls-executable (:inherit eshell-ls-unreadable))
+ (eshell-ls-missing (:inherit eshell-ls-unreadable))
+ (eshell-ls-product (:inherit eshell-ls-unreadable))
+ (eshell-ls-readonly (:inherit eshell-ls-unreadable))
+ (eshell-ls-special (:inherit eshell-ls-unreadable))
+ (eshell-ls-symlink (:inherit eshell-ls-unreadable))
+
+ ;; corfu mode
+ (corfu-default (:background ,background))
+ (corfu-current (:inverse-video t :extend t))
+ (corfu-bar (:background ,foreground))
+ (corfu-border (:background ,foreground)
+
+ ;; git gutter
+ (git-gutter:modified (:background ,highlight :foreground ,highlight))
+ (git-gutter:added (:background ,success :foreground ,success))
+ (git-gutter:deleted (:background ,warning :foreground ,warning))
+
+ ;; diff hl
+ (diff-hl-change (:background ,highlight :foreground ,highlight))
+ (diff-hl-insert (:background ,success :foreground ,success))
+ (diff-hl-delete (:background ,warning :foreground ,warning))
+
+ ;; hl line
+ (hl-line (:background ,weakest))
+ (highlight-current-line-face (:inherit hl-line))
+
+ ;; ido
+ (ido-first-match (:bold t))
+ (ido-only-match (:bold t))
+ (ido-subdir (:italic t))
+ (ido-virtual (:foreground ,weak))
+ (ido-vertical-match-face (:bold t :italic nil))
+
+ ;; org mode
+ (org-drawer (:foreground ,weak))
+ (org-special-keyword (:bold t :foreground ,weak))
+ (org-property-value (:italic t :foreground ,weak))
+ (org-table (:foreground ,weak))
+
+ (org-todo (:bold t :foreground ,highlight))
+ (org-done (:bold t :foreground ,success))
+ (org-agenda-done (:bold t :foreground ,success))
+ (org-date (:foreground ,foreground))
+ (org-agenda-structure (:foreground ,foreground))
+ (org-headline-done (:bold t :foreground ,foreground))
+
+ ;; various completion matches
+ (vertico-current (:bold t :foreground ,foreground :background ,highlight))
+
+ (completions-common-part (:bold t :underline t))
+ (orderless-match-face-0 (:bold t :underline t))
+ (orderless-match-face-1 (:bold t :underline t))
+ (orderless-match-face-2 (:bold t :underline t))
+ (orderless-match-face-3 (:bold t :underline t))
+ ))))
+
+(defun wobow-themes--variant-name (variant)
+ "Create symbol for color theme variant VARIANT."
+ (intern (format "wobow-%s" (symbol-name variant))))
+
+(defmacro wobow-themes--define-theme (variant)
+ "Define a theme for the wobow variant VARIANT."
+ (let ((name (wobow-themes--variant-name variant))
+ (doc (format "wobow theme (%s version)" variant)))
+ `(progn
+ (deftheme ,name ,doc)
+ (put ',name 'theme-immediate t)
+ (wobow-themes--variant-with-colors
+ ',variant
+ (apply 'custom-theme-set-faces ',name
+ (wobow-themes--faces-spec)))
+ (provide-theme ',name))))
+
+;;;###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 'wobow-themes)
+
+;;; wobow-themes.el ends here