New defcustom: modus-themes-tabs-accented

Check issue 229 for screenshots:
<https://gitlab.com/protesilaos/modus-themes/-/issues/229>.
This commit is contained in:
Protesilaos Stavrou 2021-07-30 14:13:20 +03:00
parent 7447abafd8
commit 5472fc0f6d
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
4 changed files with 211 additions and 134 deletions

View file

@ -57,6 +57,7 @@ demonstration:
modus-themes-no-mixed-fonts nil
modus-themes-subtle-line-numbers nil
modus-themes-success-deuteranopia t
modus-themes-tabs-accented t
modus-themes-inhibit-reload t ; only applies to `customize-set-variable' and related
modus-themes-fringes nil ; {nil,'subtle,'intense}

View file

@ -99,6 +99,7 @@ Customization Options
* Link styles:: Choose among several styles, with or without underline
* Command prompts:: Choose among plain, subtle, or intense prompts
* Mode line:: Choose among several styles, with or without borders
* Tab style:: Toggle accented background for tabs
* Completion UIs:: Choose among standard, moderate, or opinionated looks
* Mail citations:: Choose among colorful, desaturated, monochrome citations
* Fringes:: Choose among invisible, subtle, or intense fringe styles
@ -521,6 +522,7 @@ of this manual.
modus-themes-no-mixed-fonts nil
modus-themes-subtle-line-numbers nil
modus-themes-success-deuteranopia t
modus-themes-tabs-accented t
modus-themes-inhibit-reload t ; only applies to `customize-set-variable' and related
modus-themes-fringes nil ; {nil,'subtle,'intense}
@ -608,6 +610,7 @@ of this manual.
* Link styles:: Choose among several styles, with or without underline
* Command prompts:: Choose among plain, subtle, or intense prompts
* Mode line:: Choose among several styles, with or without borders
* Tab style:: Toggle accented background for tabs
* Completion UIs:: Choose among standard, moderate, or opinionated looks
* Mail citations:: Choose among colorful, desaturated, monochrome citations
* Fringes:: Choose among invisible, subtle, or intense fringe styles
@ -928,7 +931,7 @@ in these examples:
(setq modus-themes-prompts '(background gray))

File: modus-themes.info, Node: Mode line, Next: Completion UIs, Prev: Command prompts, Up: Customization Options
File: modus-themes.info, Node: Mode line, Next: Tab style, Prev: Command prompts, Up: Customization Options
4.9 Option for mode line presentation
=====================================
@ -1014,9 +1017,29 @@ of a box style, it is advised to set x-underline-at-descent-line to a
non-nil value.

File: modus-themes.info, Node: Completion UIs, Next: Mail citations, Prev: Mode line, Up: Customization Options
File: modus-themes.info, Node: Tab style, Next: Completion UIs, Prev: Mode line, Up: Customization Options
4.10 Option for completion framework aesthetics
4.10 Option for accented background in tab interfaces
=====================================================
Symbol: modus-themes-tabs-accented
Possible values:
nil (default)
t
By default, all tab interfaces use backgrounds which are shades of
gray. When this option is set to non-nil, the backgrounds become
colorful.
This affects the built-in tab-bar-mode and tab-line-mode, as well
as the Centaur tabs package.

File: modus-themes.info, Node: Completion UIs, Next: Mail citations, Prev: Tab style, Up: Customization Options
4.11 Option for completion framework aesthetics
===============================================
Symbol: modus-themes-completions
@ -1059,7 +1082,7 @@ spend some time with every one of the nil (default), moderate, and

File: modus-themes.info, Node: Mail citations, Next: Fringes, Prev: Completion UIs, Up: Customization Options
4.11 Option for mail citations
4.12 Option for mail citations
==============================
Symbol: modus-themes-mail-citations
@ -1088,7 +1111,7 @@ not touch.

File: modus-themes.info, Node: Fringes, Next: Language checkers, Prev: Mail citations, Up: Customization Options
4.12 Option for fringe visibility
4.13 Option for fringe visibility
=================================
Symbol: modus-themes-fringes
@ -1110,7 +1133,7 @@ their names imply.

File: modus-themes.info, Node: Language checkers, Next: Line highlighting, Prev: Fringes, Up: Customization Options
4.13 Option for language checkers
4.14 Option for language checkers
=================================
Symbol: modus-themes-lang-checkers
@ -1166,7 +1189,7 @@ style, is controlled by the built-in variables

File: modus-themes.info, Node: Line highlighting, Next: Line numbers, Prev: Language checkers, Up: Customization Options
4.14 Option for line highlighting (hl-line-mode)
4.15 Option for line highlighting (hl-line-mode)
================================================
Symbol: modus-themes-hl-line
@ -1213,7 +1236,7 @@ as elfeed, notmuch, and mu4e.

File: modus-themes.info, Node: Line numbers, Next: Matching parentheses, Prev: Line highlighting, Up: Customization Options
4.15 Option for line numbers (display-line-numbers-mode)
4.16 Option for line numbers (display-line-numbers-mode)
========================================================
Symbol: modus-themes-subtle-line-numbers
@ -1240,7 +1263,7 @@ are updated to accommodate this aesthetic.

File: modus-themes.info, Node: Matching parentheses, Next: Active region, Prev: Line numbers, Up: Customization Options
4.16 Option for parenthesis matching (show-paren-mode)
4.17 Option for parenthesis matching (show-paren-mode)
======================================================
Symbol: modus-themes-paren-match
@ -1284,7 +1307,7 @@ and the smartparens package.

File: modus-themes.info, Node: Active region, Next: Diffs, Prev: Matching parentheses, Up: Customization Options
4.17 Option for active region
4.18 Option for active region
=============================
Symbol: modus-themes-region
@ -1326,7 +1349,7 @@ in these examples:

File: modus-themes.info, Node: Diffs, Next: Org mode blocks, Prev: Active region, Up: Customization Options
4.18 Option for diff buffer looks
4.19 Option for diff buffer looks
=================================
Symbol: modus-themes-diffs
@ -1371,7 +1394,7 @@ interest of backward compatibility.

File: modus-themes.info, Node: Org mode blocks, Next: Org agenda, Prev: Diffs, Up: Customization Options
4.19 Option for org-mode block styles
4.20 Option for org-mode block styles
=====================================
Symbol: modus-themes-org-blocks
@ -1414,7 +1437,7 @@ aliases for gray-background and tinted-background, respectively.

File: modus-themes.info, Node: Org agenda, Next: Heading styles, Prev: Org mode blocks, Up: Customization Options
4.20 Option for Org agenda constructs
4.21 Option for Org agenda constructs
=====================================
Symbol: modus-themes-org-agenda
@ -1542,7 +1565,7 @@ are passed as a symbol. Those are:

File: modus-themes.info, Node: Heading styles, Next: Scaled headings, Prev: Org agenda, Up: Customization Options
4.21 Option for the headings overall style
4.22 Option for the headings overall style
===========================================
Symbol: modus-themes-headings
@ -1625,7 +1648,7 @@ others, such as org-fontify-done-headline.

File: modus-themes.info, Node: Scaled headings, Next: UI typeface, Prev: Heading styles, Up: Customization Options
4.22 Option for scaled headings
4.23 Option for scaled headings
===============================
Symbol: modus-themes-scale-headings
@ -1648,7 +1671,7 @@ Info.

File: modus-themes.info, Node: Scaled heading sizes, Up: Scaled headings
4.22.1 Control the scale of headings
4.23.1 Control the scale of headings
------------------------------------
In addition to the toggle for enabling scaled headings, users can also
@ -1712,7 +1735,7 @@ size of the heading, but not of keywords that were added to it, like

File: modus-themes.info, Node: UI typeface, Next: Headings' typeface, Prev: Scaled headings, Up: Customization Options
4.23 Option for variable-pitch font in UI elements
4.24 Option for variable-pitch font in UI elements
==================================================
Symbol: modus-themes-variable-pitch-ui
@ -1739,7 +1762,7 @@ Org and others (DIY).

File: modus-themes.info, Node: Headings' typeface, Prev: UI typeface, Up: Customization Options
4.24 Option for variable-pitch font in headings
4.25 Option for variable-pitch font in headings
===============================================
Symbol: modus-themes-variable-pitch-headings
@ -4871,6 +4894,7 @@ B.2 Variable index
* modus-themes-subtle-line-numbers: Line numbers. (line 6)
* modus-themes-success-deuteranopia: Success' color-code. (line 6)
* modus-themes-syntax: Syntax styles. (line 6)
* modus-themes-tabs-accented: Tab style. (line 6)
* modus-themes-variable-pitch-headings: Headings' typeface. (line 6)
* modus-themes-variable-pitch-ui: UI typeface. (line 6)
* modus-themes-vivendi-color-overrides: Override colors (DIY). (line 6)
@ -4937,101 +4961,102 @@ B.3 Concept index

Tag Table:
Node: Top860
Node: Overview6838
Node: How do the themes look like8381
Node: Learn about the latest changes8889
Node: Installation9271
Node: Install manually from source9752
Node: Install from the archives10577
Node: Install on GNU/Linux11354
Node: Debian 11 Bullseye11802
Node: GNU Guix12112
Node: Enable and load12395
Node: Sample configuration for use-package15384
Node: Differences between loading and enabling16762
Node: Customization Options18802
Node: Custom reload theme25165
Node: Success' color-code25700
Node: Bold constructs26637
Node: Italic constructs27426
Node: Syntax styles28144
Node: No mixed fonts30177
Node: Link styles31272
Node: Command prompts33643
Node: Mode line35336
Node: Completion UIs39286
Node: Mail citations41157
Node: Fringes42010
Node: Language checkers42672
Node: Line highlighting44693
Node: Line numbers46208
Node: Matching parentheses47286
Node: Active region48578
Node: Diffs49907
Node: Org mode blocks51846
Node: Org agenda53724
Node: Heading styles59216
Node: Scaled headings62258
Node: Scaled heading sizes62861
Node: UI typeface66117
Node: Headings' typeface66963
Node: Advanced customization (do-it-yourself)67587
Node: Per-theme customization settings (DIY)68992
Node: Case-by-case face specs using the themes' palette (DIY)70338
Node: Face specs at scale using the themes' palette (DIY)74802
Node: Remap face with local value (DIY)79619
Node: Cycle through arbitrary colors (DIY)82144
Node: Override colors (DIY)88710
Node: Override color saturation (DIY)93603
Node: Font configurations for Org and others (DIY)99356
Ref: Font configurations for Org and others (DIY)-Footnote-1102004
Node: Configure bold and italic faces (DIY)102191
Node: Custom Org user faces (DIY)106237
Node: Update Org block delimiter fontification (DIY)109993
Node: Measure color contrast (DIY)111953
Node: Load theme depending on time of day (DIY)114747
Node: Backdrop for pdf-tools (DIY)115787
Node: A theme-agnostic hook for theme loading (DIY)118576
Node: Face coverage120966
Node: Supported packages121435
Node: Indirectly covered packages128238
Node: Notes on individual packages128888
Node: Note on avy hints129877
Node: Note on calendarel weekday and weekend colors131045
Node: Note on underlines in compilation buffers132228
Node: Note on inline Latex in Org buffers133077
Node: Note on dimmerel133687
Node: Note on display-fill-column-indicator-mode135172
Node: Note on mmm-modeel background colors136793
Node: Note for prism139172
Node: Note for god-mode142398
Node: Note on company-mode overlay pop-up144070
Ref: Note on company-mode overlay pop-up-Footnote-1144760
Ref: Note on company-mode overlay pop-up-Footnote-2144827
Node: Note on ERC escaped color sequences144882
Ref: Note on ERC escaped color sequences-Footnote-1146310
Node: Note on powerline or spaceline146420
Node: Note on SHR colors146834
Node: Note on EWW and Elfeed fonts (SHR fonts)147269
Node: Note on Helm grep148014
Node: Note on vc-annotate-background-mode149501
Node: Note on pdf-tools link hints150386
Node: Frequently Asked Questions (FAQ)152818
Node: Is the contrast ratio about adjacent colors?153392
Node: What does it mean to avoid exaggerations?154905
Node: Why are colors mostly variants of blue magenta cyan?156740
Node: What is the best setup for legibility?161087
Node: Contributing163705
Node: Sources of the themes164108
Node: Issues you can help with164846
Node: Patches require copyright assignment to the FSF166046
Node: Acknowledgements168341
Node: Meta170896
Node: GNU Free Documentation License173042
Node: Indices198394
Node: Function index198573
Node: Variable index199810
Node: Concept index201951
Node: Overview6907
Node: How do the themes look like8450
Node: Learn about the latest changes8958
Node: Installation9340
Node: Install manually from source9821
Node: Install from the archives10646
Node: Install on GNU/Linux11423
Node: Debian 11 Bullseye11871
Node: GNU Guix12181
Node: Enable and load12464
Node: Sample configuration for use-package15453
Node: Differences between loading and enabling16831
Node: Customization Options18871
Node: Custom reload theme25343
Node: Success' color-code25878
Node: Bold constructs26815
Node: Italic constructs27604
Node: Syntax styles28322
Node: No mixed fonts30355
Node: Link styles31450
Node: Command prompts33821
Node: Mode line35514
Node: Tab style39459
Node: Completion UIs40046
Node: Mail citations41917
Node: Fringes42770
Node: Language checkers43432
Node: Line highlighting45453
Node: Line numbers46968
Node: Matching parentheses48046
Node: Active region49338
Node: Diffs50667
Node: Org mode blocks52606
Node: Org agenda54484
Node: Heading styles59976
Node: Scaled headings63018
Node: Scaled heading sizes63621
Node: UI typeface66877
Node: Headings' typeface67723
Node: Advanced customization (do-it-yourself)68347
Node: Per-theme customization settings (DIY)69752
Node: Case-by-case face specs using the themes' palette (DIY)71098
Node: Face specs at scale using the themes' palette (DIY)75562
Node: Remap face with local value (DIY)80379
Node: Cycle through arbitrary colors (DIY)82904
Node: Override colors (DIY)89470
Node: Override color saturation (DIY)94363
Node: Font configurations for Org and others (DIY)100116
Ref: Font configurations for Org and others (DIY)-Footnote-1102764
Node: Configure bold and italic faces (DIY)102951
Node: Custom Org user faces (DIY)106997
Node: Update Org block delimiter fontification (DIY)110753
Node: Measure color contrast (DIY)112713
Node: Load theme depending on time of day (DIY)115507
Node: Backdrop for pdf-tools (DIY)116547
Node: A theme-agnostic hook for theme loading (DIY)119336
Node: Face coverage121726
Node: Supported packages122195
Node: Indirectly covered packages128998
Node: Notes on individual packages129648
Node: Note on avy hints130637
Node: Note on calendarel weekday and weekend colors131805
Node: Note on underlines in compilation buffers132988
Node: Note on inline Latex in Org buffers133837
Node: Note on dimmerel134447
Node: Note on display-fill-column-indicator-mode135932
Node: Note on mmm-modeel background colors137553
Node: Note for prism139932
Node: Note for god-mode143158
Node: Note on company-mode overlay pop-up144830
Ref: Note on company-mode overlay pop-up-Footnote-1145520
Ref: Note on company-mode overlay pop-up-Footnote-2145587
Node: Note on ERC escaped color sequences145642
Ref: Note on ERC escaped color sequences-Footnote-1147070
Node: Note on powerline or spaceline147180
Node: Note on SHR colors147594
Node: Note on EWW and Elfeed fonts (SHR fonts)148029
Node: Note on Helm grep148774
Node: Note on vc-annotate-background-mode150261
Node: Note on pdf-tools link hints151146
Node: Frequently Asked Questions (FAQ)153578
Node: Is the contrast ratio about adjacent colors?154152
Node: What does it mean to avoid exaggerations?155665
Node: Why are colors mostly variants of blue magenta cyan?157500
Node: What is the best setup for legibility?161847
Node: Contributing164465
Node: Sources of the themes164868
Node: Issues you can help with165606
Node: Patches require copyright assignment to the FSF166806
Node: Acknowledgements169101
Node: Meta171656
Node: GNU Free Documentation License173802
Node: Indices199154
Node: Function index199333
Node: Variable index200570
Node: Concept index202784

End Tag Table

View file

@ -383,6 +383,7 @@ this manual.
modus-themes-no-mixed-fonts nil
modus-themes-subtle-line-numbers nil
modus-themes-success-deuteranopia t
modus-themes-tabs-accented t
modus-themes-inhibit-reload t ; only applies to `customize-set-variable' and related
modus-themes-fringes nil ; {nil,'subtle,'intense}
@ -875,6 +876,27 @@ Furthermore, because Moody expects an underline and overline instead of
a box style, it is advised to set ~x-underline-at-descent-line~ to a
non-nil value.
** Option for accented background in tab interfaces
:properties:
:alt_title: Tab style
:description: Toggle accented background for tabs
:custom_id: h:27cef8f5-dc4e-4c93-ba41-b899e650d936
:end:
#+vindex: modus-themes-tabs-accented
Symbol: ~modus-themes-tabs-accented~
Possible values:
+ ~nil~ (default)
+ ~t~
By default, all tab interfaces use backgrounds which are shades of gray.
When this option is set to non-nil, the backgrounds become colorful.
This affects the built-in ~tab-bar-mode~ and ~tab-line-mode~, as well as the
Centaur tabs package.
** Option for completion framework aesthetics
:properties:
:alt_title: Completion UIs

View file

@ -5,8 +5,8 @@
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; URL: https://gitlab.com/protesilaos/modus-themes
;; Version: 1.5.0
;; Last-Modified: <2021-07-29 12:46:36 +0300>
;; Package-Requires: ((emacs "26.1"))
;; Last-Modified: <2021-07-30 14:08:59 +0300>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
;; This file is part of GNU Emacs.
@ -616,7 +616,9 @@ cover the blue-cyan-magenta side of the spectrum."
(bg-tab-bar . "#d5d5d5")
(bg-tab-active . "#f6f6f6")
(bg-tab-inactive . "#bdbdbd")
(bg-tab-inactive-alt . "#999999")
(bg-tab-inactive-accent . "#a9b4f6")
(bg-tab-inactive-alt . "#a2a2a2")
(bg-tab-inactive-alt-accent . "#9fa6d0")
(red-tab . "#680000")
(green-tab . "#003900")
@ -859,7 +861,9 @@ symbol and the latter as a string.")
(bg-tab-bar . "#2c2c2c")
(bg-tab-active . "#0e0e0e")
(bg-tab-inactive . "#3d3d3d")
(bg-tab-inactive-accent . "#35398f")
(bg-tab-inactive-alt . "#595959")
(bg-tab-inactive-alt-accent . "#505588")
(red-tab . "#ffc0bf")
(green-tab . "#88ef88")
@ -2879,6 +2883,18 @@ colored into a uniform shade of shade of gray."
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Mail citations"))
(defcustom modus-themes-tabs-accented nil
"Toggle accented tab backgrounds, instead of the default gray.
This affects the built-in tab-bar mode and tab-line mode, as well
as the Centaur tabs package."
:group 'modus-themes
:package-version '(modus-themes . "1.6.0")
:version "28.1"
:type 'boolean
:set #'modus-themes--set-option
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Tab style"))
;;; Internal functions
@ -3749,6 +3765,22 @@ desaturated counterpart."
('desaturated (list :foreground subtlefg))
(_ (list :foreground mainfg))))
(defun modus-themes--tab (bg &optional bgaccent fg fgaccent box-p bold-p)
"Helper function for tabs.
BG is the default background, while BGACCENT is its more colorful
alternative. Optional FG is a foreground color that combines
with BG. Same principle FGACCENT.
BOX-P and BOLD-P determine the use of a box property and the
application of a bold weight, respectively."
(let ((background (if modus-themes-tabs-accented (or bgaccent bg) bg))
(foreground (if modus-themes-tabs-accented (or fgaccent fg) fg)))
(list
:inherit (if bold-p 'bold 'unspecified)
:background background
:foreground (or foreground 'unspecified)
:box (if box-p (list :line-width 2 :color background) 'unspecified))))
;;;; Utilities for DIY users
@ -4398,11 +4430,11 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(centaur-tabs-close-unselected ((,class :inherit centaur-tabs-unselected)))
`(centaur-tabs-modified-marker-selected ((,class :inherit centaur-tabs-selected)))
`(centaur-tabs-modified-marker-unselected ((,class :inherit centaur-tabs-unselected)))
`(centaur-tabs-default ((,class :background ,bg-main :foreground ,bg-main)))
`(centaur-tabs-selected ((,class :inherit bold :background ,bg-tab-active :foreground ,fg-main)))
`(centaur-tabs-selected-modified ((,class :inherit italic :background ,bg-tab-active :foreground ,fg-main)))
`(centaur-tabs-unselected ((,class :background ,bg-tab-inactive :foreground ,fg-dim)))
`(centaur-tabs-unselected-modified ((,class :inherit italic :background ,bg-tab-inactive :foreground ,fg-dim)))
`(centaur-tabs-default (( )))
`(centaur-tabs-selected ((,class ,@(modus-themes--tab bg-tab-active nil nil nil t t))))
`(centaur-tabs-selected-modified ((,class :inherit (italic centaur-tabs-selected))))
`(centaur-tabs-unselected ((,class ,@(modus-themes--tab bg-tab-inactive bg-tab-inactive-accent fg-dim fg-main t))))
`(centaur-tabs-unselected-modified ((,class :inherit (italic centaur-tabs-unselected))))
;;;;; cfrs
`(cfrs-border-color ((,class :background ,fg-window-divider-inner)))
;;;;; change-log and log-view (`vc-print-log' and `vc-print-root-log')
@ -7108,23 +7140,20 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(tab-bar-groups-tab-8 ((,class ,@(modus-themes--variable-pitch-ui) :foreground ,magenta-tab)))
;;;;; tab-bar-mode
`(tab-bar ((,class ,@(modus-themes--variable-pitch-ui)
:background ,bg-tab-bar :foreground ,fg-main)))
`(tab-bar-tab ((,class :inherit bold :box (:line-width 2 :color ,bg-tab-active)
:background ,bg-tab-active :foreground ,fg-main)))
`(tab-bar-tab-inactive ((,class :box (:line-width 2 :color ,bg-tab-inactive)
:background ,bg-tab-inactive :foreground ,fg-dim)))
,@(modus-themes--tab bg-active bg-active-accent))))
`(tab-bar-tab ((,class ,@(modus-themes--tab bg-tab-active nil nil nil t t))))
`(tab-bar-tab-inactive ((,class ,@(modus-themes--tab bg-tab-inactive bg-tab-inactive-accent fg-dim fg-main t))))
;;;;; tab-line-mode
`(tab-line ((,class ,@(modus-themes--variable-pitch-ui)
:height 0.95 :background ,bg-tab-bar :foreground ,fg-main)))
,@(modus-themes--tab bg-active bg-active-accent)
:height 0.95)))
`(tab-line-close-highlight ((,class :foreground ,red)))
`(tab-line-highlight ((,class :background ,blue-subtle-bg :foreground ,fg-dim)))
`(tab-line-tab ((,class :inherit bold :box (:line-width 2 :color ,bg-tab-active)
:background ,bg-tab-active :foreground ,fg-main)))
`(tab-line-highlight ((,class :inherit modus-themes-active-blue)))
`(tab-line-tab ((,class ,@(modus-themes--tab bg-tab-active nil nil nil t t))))
`(tab-line-tab-current ((,class :inherit tab-line-tab)))
`(tab-line-tab-inactive ((,class :box (:line-width 2 :color ,bg-tab-inactive)
:background ,bg-tab-inactive :foreground ,fg-dim)))
`(tab-line-tab-inactive-alternate ((,class :box (:line-width 2 :color ,bg-tab-inactive-alt)
:background ,bg-tab-inactive-alt :foreground ,fg-main)))
`(tab-line-tab-inactive ((,class ,@(modus-themes--tab bg-tab-inactive bg-tab-inactive-accent fg-dim fg-main t))))
`(tab-line-tab-inactive-alternate ((,class ,@(modus-themes--tab bg-tab-inactive-alt
bg-tab-inactive-alt-accent fg-main nil t))))
;;;;; table (built-in table.el)
`(table-cell ((,class :background ,blue-nuanced-bg)))
;;;;; telega