From e9f2c276aaa3a7a7d8848fc50306b2a1240eecd2 Mon Sep 17 00:00:00 2001 From: rearman Date: Tue, 23 Sep 2025 17:01:30 -0400 Subject: [PATCH] Try out new ultra-mono theme even more monochrome than fully-mono. --- init.el | 6 +- re/wobow-bow-theme.el | 2 + re/wobow-themes.el | 176 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 re/wobow-bow-theme.el create mode 100644 re/wobow-themes.el diff --git a/init.el b/init.el index 6f5ce97..85307cb 100644 --- a/init.el +++ b/init.el @@ -15,6 +15,7 @@ (require 're-vc-defuns) (require 'acme-mouse) (require 'fully-mono-themes) +(require 'wobow-themes) (require 're-os-specific) (require 're-bindings) @@ -42,7 +43,7 @@ scroll-conservatively 101) ;; Buffer dealiŋ -(global-acme-mouse-mode t) +;; (global-acme-mouse-mode t) (setq disabled-command-function nil save-interprogram-paste-before-kill t @@ -112,7 +113,8 @@ (lambda () (keymap-set text-mode-map "" 'self-insert-command))) -(load-theme 'fully-mono-full-white t) +;; (load-theme 'fully-mono-white t) +(load-theme 'wobow-bow t) (setq show-paren-delay 0 show-paren-style 'expression) diff --git a/re/wobow-bow-theme.el b/re/wobow-bow-theme.el new file mode 100644 index 0000000..db919c6 --- /dev/null +++ b/re/wobow-bow-theme.el @@ -0,0 +1,2 @@ +(require 'wobow-themes) +(wobow-themes--define-theme bow) diff --git a/re/wobow-themes.el b/re/wobow-themes.el new file mode 100644 index 0000000..ac98773 --- /dev/null +++ b/re/wobow-themes.el @@ -0,0 +1,176 @@ +;;; 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 -- 2.39.5