[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-vivendi-theme 75a8b8f 32/73: New CUSTOM OPTION fo
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-vivendi-theme 75a8b8f 32/73: New CUSTOM OPTION for subtle or intense prompts |
Date: |
Wed, 26 Aug 2020 09:20:57 -0400 (EDT) |
branch: externals/modus-vivendi-theme
commit 75a8b8fac4a6940c5108b825c8118833680c10e2
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
New CUSTOM OPTION for subtle or intense prompts
---
README.org | 27 +++++++++++++++++++++++++++
modus-operandi-theme.el | 48 +++++++++++++++++++++++++++++++++++++++++++++---
modus-vivendi-theme.el | 48 +++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 117 insertions(+), 6 deletions(-)
diff --git a/README.org b/README.org
index 71f4800..b021425 100644
--- a/README.org
+++ b/README.org
@@ -589,6 +589,32 @@ delimiters). This affects tools such as the built-in
=show-paren-mode= as
well as the =smartparens= package. The default is to use a subtle warm
colour for the background of those overlays.
+** Option for "subtle" or "intense" prompts
+:PROPERTIES:
+:CUSTOM_ID: h:53b947f7-c713-4ac2-97f7-9be44a41a67a
+:END:
+
+Symbol names:
+
++ =modus-operandi-theme-prompts=
++ =modus-vivendi-theme-prompts=
+
+Possible values:
+
+1. =nil= (default)
+2. =subtle=
+3. =intense=
+
+The symbols "subtle" and "intense" will apply a combination of accented
+background and foreground to the minibuffer and other REPL prompts (like
+=M-x shell=). The difference between the two is that the latter has a
+more pronounced/noticeable effect than the former.
+
+The default is to not use any background for such prompts, while only
+relying on an accented foreground colour.
+
+*This option is new. Please send feedback.*
+
** Option for intense standard completions
:PROPERTIES:
:CUSTOM_ID: h:5b0b1e66-8287-4f3f-ba14-011c29320a3f
@@ -669,6 +695,7 @@ being available.
modus-operandi-theme-faint-syntax t
modus-operandi-theme-intense-hl-line t
modus-operandi-theme-intense-paren-match t
+ modus-operandi-theme-prompts 'subtle ; {nil,'subtle,'intense}
modus-operandi-theme-intense-standard-completions t
modus-operandi-theme-subtle-diffs t
modus-operandi-theme-org-blocks 'greyscale ; {nil,'greyscale,'rainbow}
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 67c1783..2ef6ef2 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -47,6 +47,7 @@
;; modus-operandi-theme-scale-headings (boolean)
;; modus-operandi-theme-fringes (choice)
;; modus-operandi-theme-org-blocks (choice)
+;; modus-operandi-theme-prompts (choice)
;; modus-operandi-theme-3d-modeline (boolean)
;; modus-operandi-theme-subtle-diffs (boolean)
;; modus-operandi-theme-faint-syntax (boolean)
@@ -575,6 +576,19 @@ association list)."
"Use prominent backgrounds for Icomplete, Ido, or similar."
:type 'boolean)
+(defcustom modus-operandi-theme-prompts nil
+ "Use subtle or intense styles for minibuffer and REPL prompts.
+
+Nil means to only use an accented foreground colour.
+
+Options `subtle' and `intense' will change both the background
+and the foreground values. The latter has a more pronounced
+effect than the former."
+ :type '(choice
+ (const :tag "No prompt background (default)" nil)
+ (const :tag "Subtle accented background for the prompt" subtle)
+ (const :tag "Intense background and foreground for the prompt"
intense)))
+
(defcustom modus-operandi-theme-intense-hl-line nil
"Use more prominent background for `hl-line-mode'."
:type 'boolean)
@@ -608,6 +622,20 @@ more pronounced greyscale colour."
(t
(list :background nil))))
+(defun modus-operandi-theme-prompt (mainfg subtlebg subtlefg intensebg
intensefg)
+ "Conditional use of background colours for prompts.
+MAINFG is the prompt's standard foreground. SUBTLEBG should be a
+subtle accented background that works with SUBTLEFG. INTENSEBG
+must be a more pronounced accented colour that should be
+combinable with INTENSEFG."
+ (cond
+ ((eq modus-operandi-theme-prompts 'intense)
+ (list :background intensebg :foreground intensefg))
+ ((eq modus-operandi-theme-prompts 'subtle)
+ (list :background subtlebg :foreground subtlefg))
+ (t
+ (list :background nil :foreground mainfg))))
+
(defun modus-operandi-theme-paren (normalbg intensebg)
"Conditional use of intense colours for matching parentheses.
NORMALBG should the special palette colour 'bg-paren-match' or
@@ -1080,7 +1108,12 @@ Also bind `class' to ((class color) (min-colors 89))."
;; (set-face-attribute 'bold nil :weight 'semibold)
`(bold ((,class :weight bold)))
`(comint-highlight-input ((,class :inherit bold)))
- `(comint-highlight-prompt ((,class ,@(modus-operandi-theme-bold-weight)
:foreground ,cyan-alt-other)))
+ `(comint-highlight-prompt ((,class ,@(modus-operandi-theme-bold-weight)
+ ,@(modus-operandi-theme-prompt cyan
+
blue-nuanced-bg
+ blue-alt
+
blue-refine-bg
+
blue-refine-fg))))
`(error ((,class :inherit bold :foreground ,red)))
`(escape-glyph ((,class :foreground ,fg-escape-char-construct)))
`(file-name-shadow ((,class :foreground ,fg-unfocused)))
@@ -1091,7 +1124,11 @@ Also bind `class' to ((class color) (min-colors 89))."
`(italic ((,class :slant italic)))
`(nobreak-hyphen ((,class :foreground ,fg-escape-char-construct)))
`(nobreak-space ((,class :foreground ,fg-escape-char-construct :underline
t)))
- `(minibuffer-prompt ((,class :foreground ,cyan-alt-other)))
+ `(minibuffer-prompt ((,class ,@(modus-operandi-theme-prompt cyan-alt-other
+ cyan-nuanced-bg
+ cyan
+ blue-fringe-bg
+ fg-main))))
`(mm-command-output ((,class :foreground ,red-alt-other)))
`(mm-uu-extract ((,class :background ,bg-dim :foreground ,fg-special-mild)))
`(next-error ((,class :inherit modus-theme-subtle-red)))
@@ -1829,7 +1866,12 @@ Also bind `class' to ((class color) (min-colors 89))."
`(eshell-ls-special ((,class :inherit bold :foreground ,magenta)))
`(eshell-ls-symlink ((,class :foreground ,cyan :underline t)))
`(eshell-ls-unreadable ((,class :background ,bg-inactive :foreground
,fg-inactive)))
- `(eshell-prompt ((,class ,@(modus-operandi-theme-bold-weight) :foreground
,green-alt-other)))
+ `(eshell-prompt ((,class ,@(modus-operandi-theme-bold-weight)
+ ,@(modus-operandi-theme-prompt green-alt-other
+ green-nuanced-bg
+ green-alt
+ green-refine-bg
+ green-refine-fg))))
;;;;; eshell-fringe-status
`(eshell-fringe-status-failure ((,class :foreground ,red)))
`(eshell-fringe-status-success ((,class :foreground ,green)))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 0da7807..5976a21 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -47,6 +47,7 @@
;; modus-vivendi-theme-scale-headings (boolean)
;; modus-vivendi-theme-fringes (choice)
;; modus-vivendi-theme-org-blocks (choice)
+;; modus-vivendi-theme-prompts (choice)
;; modus-vivendi-theme-3d-modeline (boolean)
;; modus-vivendi-theme-subtle-diffs (boolean)
;; modus-vivendi-theme-faint-syntax (boolean)
@@ -575,6 +576,19 @@ association list)."
"Use prominent backgrounds for Icomplete, Ido, or similar."
:type 'boolean)
+(defcustom modus-vivendi-theme-prompts nil
+ "Use subtle or intense styles for minibuffer and REPL prompts.
+
+Nil means to only use an accented foreground colour.
+
+Options `subtle' and `intense' will change both the background
+and the foreground values. The latter has a more pronounced
+effect than the former."
+ :type '(choice
+ (const :tag "No prompt background (default)" nil)
+ (const :tag "Subtle accented background for the prompt" subtle)
+ (const :tag "Intense background and foreground for the prompt"
intense)))
+
(defcustom modus-vivendi-theme-intense-hl-line nil
"Use more prominent background for `hl-line-mode'."
:type 'boolean)
@@ -608,6 +622,20 @@ more pronounced greyscale colour."
(t
(list :background nil))))
+(defun modus-vivendi-theme-prompt (mainfg subtlebg subtlefg intensebg
intensefg)
+ "Conditional use of background colours for prompts.
+MAINFG is the prompt's standard foreground. SUBTLEBG should be a
+subtle accented background that works with SUBTLEFG. INTENSEBG
+must be a more pronounced accented colour that should be
+combinable with INTENSEFG."
+ (cond
+ ((eq modus-vivendi-theme-prompts 'intense)
+ (list :background intensebg :foreground intensefg))
+ ((eq modus-vivendi-theme-prompts 'subtle)
+ (list :background subtlebg :foreground subtlefg))
+ (t
+ (list :background nil :foreground mainfg))))
+
(defun modus-vivendi-theme-paren (normalbg intensebg)
"Conditional use of intense colours for matching parentheses.
NORMALBG should the special palette colour 'bg-paren-match' or
@@ -1080,7 +1108,12 @@ Also bind `class' to ((class color) (min-colors 89))."
;; (set-face-attribute 'bold nil :weight 'semibold)
`(bold ((,class :weight bold)))
`(comint-highlight-input ((,class :inherit bold)))
- `(comint-highlight-prompt ((,class ,@(modus-vivendi-theme-bold-weight)
:foreground ,cyan-alt-other)))
+ `(comint-highlight-prompt ((,class ,@(modus-vivendi-theme-bold-weight)
+ ,@(modus-vivendi-theme-prompt cyan
+
blue-nuanced-bg
+ blue-alt
+
blue-refine-bg
+
blue-refine-fg))))
`(error ((,class :inherit bold :foreground ,red)))
`(escape-glyph ((,class :foreground ,fg-escape-char-construct)))
`(file-name-shadow ((,class :foreground ,fg-unfocused)))
@@ -1091,7 +1124,11 @@ Also bind `class' to ((class color) (min-colors 89))."
`(italic ((,class :slant italic)))
`(nobreak-hyphen ((,class :foreground ,fg-escape-char-construct)))
`(nobreak-space ((,class :foreground ,fg-escape-char-construct :underline
t)))
- `(minibuffer-prompt ((,class :foreground ,cyan-alt-other)))
+ `(minibuffer-prompt ((,class ,@(modus-vivendi-theme-prompt cyan-alt-other
+ cyan-nuanced-bg
+ cyan
+ blue-fringe-bg
+ fg-main))))
`(mm-command-output ((,class :foreground ,red-alt-other)))
`(mm-uu-extract ((,class :background ,bg-dim :foreground ,fg-special-mild)))
`(next-error ((,class :inherit modus-theme-subtle-red)))
@@ -1829,7 +1866,12 @@ Also bind `class' to ((class color) (min-colors 89))."
`(eshell-ls-special ((,class :inherit bold :foreground ,magenta)))
`(eshell-ls-symlink ((,class :foreground ,cyan :underline t)))
`(eshell-ls-unreadable ((,class :background ,bg-inactive :foreground
,fg-inactive)))
- `(eshell-prompt ((,class ,@(modus-vivendi-theme-bold-weight) :foreground
,green-alt-other)))
+ `(eshell-prompt ((,class ,@(modus-vivendi-theme-bold-weight)
+ ,@(modus-vivendi-theme-prompt green-alt-other
+ green-nuanced-bg
+ green-alt
+ green-refine-bg
+ green-refine-fg))))
;;;;; eshell-fringe-status
`(eshell-fringe-status-failure ((,class :foreground ,red)))
`(eshell-fringe-status-success ((,class :foreground ,green)))
- [elpa] externals/modus-vivendi-theme 673191c 58/73: Merge branch 'master' into 'master', (continued)
- [elpa] externals/modus-vivendi-theme 673191c 58/73: Merge branch 'master' into 'master', Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 74af9df 61/73: Tweak magit-tag face, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 405e7e0 66/73: Remove a couple outdated notes in the README, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme fd3871d 29/73: Internal: simplify coloured underline expressions, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 8958ec1 35/73: Tweak foreground of intense prompts: see 75a8b8fac, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme d386ee5 36/73: Add tentative support for SPACELINE, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme fa56dce 37/73: Tweak Helm select "opinionated" option (0ff98fd15), Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 0950acb 44/73: Refine bg-paren-match colours, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme f10541a 53/73: Tweak colours of bongo-elapsed-track-part, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 9d79379 30/73: Extend 'transient' faces with hydra-style colours, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 75a8b8f 32/73: New CUSTOM OPTION for subtle or intense prompts,
Stefan Monnier <=
- [elpa] externals/modus-vivendi-theme 401e998 40/73: Refine modeline border colours, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 1024408 50/73: Refine 'symbol-overlay-default-face', Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 6163afe 55/73: Internal: minor documentation update, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme b60deb5 60/73: Tweak magit-section-heading face, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 7ce15e4 65/73: Fix README link to contact page, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 4021bd5 68/73: Improves the note in readme re powerline & spaceline, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 67554a6 72/73: Prepare version 0.12.0, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme d6359d3 49/73: Customise 'rectangle-preview' and reposition faces, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 4561a7e 54/73: Refine mu4e header and replied faces, Stefan Monnier, 2020/08/26
- [elpa] externals/modus-vivendi-theme 976b05e 52/73: Stop scaling Latex sectioning faces, Stefan Monnier, 2020/08/26