Early prototype

This commit is contained in:
Protesilaos Stavrou 2020-11-11 11:58:35 +02:00
commit 06b9d14ab2
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
6 changed files with 155 additions and 0 deletions

20
modus-operandi-theme.el Normal file
View file

@ -0,0 +1,20 @@
;;; modus-operandi-theme.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
(require 'modus-operandi)
(require 'modus-themes-core)
(require 'modus-themes-faces)
(modus-themes-core-with-colors
modus-operandi-colors-alist-default
(custom-theme-set-faces
'modus-operandi
(modus-themes-faces)))
(provide 'modus-operandi-theme)
;;; modus-operandi-theme.el ends here

38
modus-operandi.el Normal file
View file

@ -0,0 +1,38 @@
;;; modus-operandi.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
(defgroup modus-operandi ()
"Highly accessible light theme"
:group 'faces
:prefix "modus-operandi-")
(deftheme modus-operandi
"Light theme that conforms with the highest accessibility
standard for color contrast between background and foreground
elements (WCAG AAA).")
(defconst modus-operandi-colors-alist-default
'(("bg-main" . "#ffffff") ("fg-main" . "#000000"))
"The entire palette of `modus-operandi-theme'.
Each element has the form (NAME . HEX).")
;;;###autoload
(defcustom modus-operandi-colors-alist-override '()
"Alist of color palette overrides."
:type '(alist
:key-type (string :tag "Name")
:value-type (string :tag " Hex")))
;; (modus-themes-core-with-colors
;; modus-operandi-colors-alist-default
;; (custom-theme-set-faces
;; 'modus-operandi
;; `(default ((,class :background ,bg-main :foreground ,fg-main)))))
(provide 'modus-operandi)
;;; modus-operandi.el ends here

18
modus-themes-core.el Normal file
View file

@ -0,0 +1,18 @@
;;; modus-themes-core.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
(defmacro modus-themes-core-with-colors (alist &rest body)
"`let' bind ALIST elements around BODY."
`(let ((class '((class color) (min-colors 89)))
,@(mapcar (lambda (cons)
(list (intern (car cons)) (cdr cons)))
(eval alist)))
,@body))
(provide 'modus-themes-core)
;;; modus-themes-core.el ends here

26
modus-themes-faces.el Normal file
View file

@ -0,0 +1,26 @@
;;; modus-themes-faces.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
;; (defmacro modus-themes-faces ()
;; "Return a backquote which defines a list of face specs.
;; It expects to be evaluated in a scope in which the various color
;; names to which it refers are bound."
;; (quote
;; (mapcar
;; (lambda (entry)
;; (list (car entry) `((,class ,@(cdr entry)))))
;; `(
;; (default :background ,bg-main :foreground ,fg-main)))))
(defun modus-themes-faces ()
"Face specs for use with `modus-themes-core-with-colors'."
(quote
`(default ((,class :background ,bg-main :foreground ,fg-main)))))
(provide 'modus-themes-faces)
;;; modus-themes-faces.el ends here

20
modus-vivendi-theme.el Normal file
View file

@ -0,0 +1,20 @@
;;; modus-vivendi-theme.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
(require 'modus-vivendi)
(require 'modus-themes-core)
(require 'modus-themes-faces)
(modus-themes-core-with-colors
modus-vivendi-colors-alist-default
(custom-theme-set-faces
'modus-vivendi
(modus-themes-faces)))
(provide 'modus-vivendi-theme)
;;; modus-vivendi-theme.el ends here

33
modus-vivendi.el Normal file
View file

@ -0,0 +1,33 @@
;;; modus-vivendi.el --- Testing -*- lexical-binding:t -*-
;; URL: https://www.protesilaos.com
;; Version: 0.0.0
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; -
;;; Code:
(defgroup modus-vivendi ()
"Highly accessible light theme"
:group 'faces
:prefix "modus-vivendi-")
(deftheme modus-vivendi
"Light theme that conforms with the highest accessibility
standard for color contrast between background and foreground
elements (WCAG AAA).")
(defconst modus-vivendi-colors-alist-default
'(;; base values
("bg-main" . "#000000") ("fg-main" . "#ffffff"))
"The entire palette of `modus-vivendi-theme'.
Each element has the form (NAME . HEX).")
;;;###autoload
(defcustom modus-vivendi-colors-alist-override '()
"Alist of color palette overrides."
:type '(alist
:key-type (string :tag "Name")
:value-type (string :tag " Hex")))
(provide 'modus-vivendi)
;;; modus-vivendi.el ends here