Giter VIP home page Giter VIP logo

modus-themes's Introduction

Modus themes for GNU Emacs

IMAGES HERE: https://protesilaos.com/emacs/modus-themes-pictures.

Highly accessible themes, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA). They also are optimised for users with red-green colour deficiency.

The themes are very customisable and provide support for a very wide range of packages. Their manual is detailed so that new users can get started, while it also provides custom code for all sorts of more advanced customisations.

Since August 2020, the original Modus themes (modus-operandi, modus-vivendi) are built into Emacs version 28 or higher. Emacs 28 ships with modus-themes version 1.6.0. Emacs 29 includes version 3.0.0. Emacs 30 provides a newer, refactored version that thoroughly refashions how the themes are implemented and customized. Such major versions are not backward-compatible due to the limited resources at my disposal to support multiple versions of Emacs and of the themes across the years.

modus-themes's People

Contributors

ajgrf avatar alternateved avatar andersjohansson avatar basil-conto avatar bkhl avatar con5tella avatar dinkonin avatar divinedominion avatar dme avatar doolio avatar fritzgrabo avatar hron avatar iostapyshyn avatar koekelas avatar koen-vg avatar maurooaranda avatar mgi avatar minad avatar nbarrientos avatar okamsn avatar peniblec avatar phikal avatar pierretechoueyres avatar protesilaos avatar skangas avatar slotthe avatar snichone avatar steve-downey avatar thanosapollo avatar utkarsh181 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modus-themes's Issues

white line over modeline

Thank you for your effort for this great package. Recently I found an issue while using with keycast. There is one pixel line through the background.
Screenshot_20220723_082952

I 've reproduce this in emacs -Q with the following code snippet

(use-package modus-themes
  ;; (info "(modus-themes) Top")
  :init
  (setq modus-themes-mode-line '(moody accented borderless))
  (modus-themes-load-themes)
  :config
  ;; Load the theme of your choice:
  (modus-themes-load-operandi)
  :bind ("<f5>" . modus-themes-toggle))

(use-package keycast
  :init
  (with-eval-after-load 'keycast
    (define-minor-mode keycast-mode
      "Show current command and its key binding in the mode line."
      :global t
      (if keycast-mode
          (add-hook 'pre-command-hook 'keycast--update t)
        (remove-hook 'pre-command-hook 'keycast--update)))

    (add-to-list 'global-mode-string '("" keycast-mode-line " ")))
  (keycast-mode))

Getting an error from load-theme: byte-code: Wrong number of arguments: (8 . 10), 11

Sorry I'm a relative newb to elisp so I don't really understand what the issue is. But within modus-themes-load-themes, you seem to call (load-theme 'modus-vivendi t t). This makes sense looking at the function definition, but when I try to evaluate that, I get byte-code: Wrong number of arguments: (8 . 10), 11.

When I evaluate (load-theme 'modus-vivendi) it loads absolutely fine. Is there something else I can provide to help debug? Any thoughts on what the issue is?

log from direct evaluation:

Debugger entered--Lisp error: (wrong-number-of-arguments (8 . 10) 11)
  modus-themes--mode-line-attrs("#f4f4f4" "#323232" "#e0e6f0" "#323232" "#ffffff" "#2a2a66" "#a8a8a8" "#323232" alt-style nil "#000000")
  byte-code("\306\307!\203\34\0\10\203\34\0\310\10!\311\312\11\"\232\203\34\0\307\313\314\"\204 \0\315\313!\210\316\317\320\321#\210\322\323\317!\324\325\2\"\324\326\3\"..." [load-file-name data-directory modus-themes-scale-4 modus-themes-scale-3 modus-themes-scale-2 modus-themes-scale-1 fboundp require-theme file-name-directory expand-file-name "themes/" modus-themes t require custom-declare-theme modus-vivendi modus-vivendi-theme "Accessible and customizable dark theme (WCAG AAA s..." ((class color) (min-colors 89)) modus-themes--palette alist-get bg-main fg-main bg-dim fg-dim bg-alt fg-alt bg-active fg-active bg-inactive fg-inactive bg-active-accent bg-special-cold fg-special-cold bg-special-mild fg-special-mild bg-special-warm fg-special-warm bg-special-calm fg-special-calm red red-alt red-alt-other red-faint red-alt-faint red-alt-other-faint green green-alt green-alt-other green-faint ...] 2891)

Visually inconsistencies within org chunks

Not sure if this is a modus-themes bug or not, but if you see the screenshot below you'll notice lots of visual inconsistencies (e.g., <- is different in two places, sometimes a ) and a > has a background color other times it doesn't).

image

The visual inconsistencies disappear when viewed in ESS mode.

image

Any thoughts about how to fix this? Thanks for the amazing theme, too.

Feature Request - Support mini-modeline

Hi prot, I hope you are well.

I was wondering how hard would it be to add support for mini-modeline. I recently switched to it from awesome-tray which is already supported by the wonderful modus themes.

Thanks in advance!

org-block-begin-line

I notice that in the current modus-themes you are missing an inherit.

  `(org-block-begin-line ((,class :inherit modus-themes-fixed-pitch
                                    ,@(modus-themes--org-block-delim
                                       bg-dim fg-special-cold
                                       bg-alt fg-alt))))

But in org-mode that comes with emacs 28.1 org-block-begin-line inherits from org-meta-line

(defface org-block-begin-line '((t (:inherit org-meta-line)))
  "Face used for the line delimiting the begin of source blocks."
  :group 'org-faces)

Emacs crash with Segmentation fault: 11

Steps to reproduce

  • start Emacs with emacs -Q , and eval following codes
(setq max-specpdl-size 10000000
      max-lisp-eval-depth 100000)

(load-theme 'modus-operandi t)
  • then Emacs will crash with Segmentation fault: 11

Tested on

  • GNU Emacs 28.0.92 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2022-03-14

If comment the setq out, Emacs will not crash.

I use lldb to debug this, there is the backtrace

Process 38255 launched: '/Applications/Emacs.app/Contents/MacOS/Emacs-arm64-12' (arm64)
Process 38255 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16f46ffe0)
    frame #0: 0x00000001000aefdc Emacs-arm64-12`lface_from_face_name
Emacs-arm64-12`lface_from_face_name:
->  0x1000aefdc <+0>:  stp    x22, x21, [sp, #-0x30]!
    0x1000aefe0 <+4>:  stp    x20, x19, [sp, #0x10]
    0x1000aefe4 <+8>:  stp    x29, x30, [sp, #0x20]
    0x1000aefe8 <+12>: add    x29, sp, #0x20            ; =0x20 

Increase high contrast for some commands

Hi Protesilaos, I've been using modus-themes for more than a year now and I love both of them.
Quite often I find myself struggling to find out in which occurence I am when for example, doing a search in the buffer (consul-line), as shown in the screenshot.

image

In the interest of having a high contrast and in my opinion a quicker way of finding the selected line in these situations I wonder if it would be possible to underline the current line. And of course, if you think there is another possible change with colors (like giving a shadow to the selected line) I'm all ears.

Thank you.

Cannot override colors of the rainbow delimiters

Just updated to 4.0.0 and now I have bright colored parens and the "faint" preset doesn't affect them as it was with old "faint" customization. And also I just can't override, say, rainbow-delimiters-depth-1-face's color without changing the magenta-intense globally.

Variable pitch mode on just text after a header line

Hola Prot

I want to share with you what I am doing. Maybe you see it interesting. Maybe suggest a better way to do this. Or maybe, you fix this and incorporate on your code. Or maybe not interesting. Anyway, I think it is a good idea to share this with you.

I am not good at elisp. I don't know how to change this code the right way. This is why I didn't make a pull request to suggest a way to add this and save you some time.

I like using variable pitch mode on just the text after a header. Every other font (like header lines, tables, blocks, etc) Should be fixed pitch in order to look good and have aligned the tags and the indentation, the calendar, etc.

I have been using the following hack to make it look this way.

The relevant parts on my config files:

(set-face-attribute 'default nil :family "Iosevka Fixed" :height 140)
(set-face-attribute 'variable-pitch nil :family "Fira Sans Book" :height 0.96)
(set-face-attribute 'fixed-pitch nil :family (face-attribute 'default :family))

(add-hook 'text-mode-hook 'variable-pitch-mode)

(setq 
      modus-themes-mixed-fonts t
      modus-themes-headings
      '((1 . (overline variable-pitch bold 1.2))
        (2 . (rainbow variable-pitch semibold 1.2))
        (3 . (rainbow variable-pitch semibold 1.1))
        (t . (monochrome variable-pitch 1.1)))
)

Then, I change on modus-themes.el as shown in the following diff:

@@ -3228,7 +3228,7 @@ that combines well with the background and foreground."
          (style (or key (modus-themes--key-cdr t modus-themes-headings)))
          (style-listp (listp style))
          (properties style)
-         (var (when (memq 'variable-pitch properties) 'variable-pitch))
+         (var (when (memq 'variable-pitch properties) 'fixed-pitch))
          (varbold (if var
                       (append (list 'bold) (list var))
                     'bold))

Thanks for reading this. I admire your work.

svg get incorrectly rendered in color

Hi,

I have been experiencing weird rendering issues when svg files get rendered in emacs.

Here is the svg file generated by xenops package which is correctly rendered in edge:

image

However, in emacs, the colors get weird:

image

When I switch to another theme (i.e. tango-dark), these kind of issue is gone:

image

Would you please help to figure out the reason for that? Currently I have totally no clue.

The svg file which I used for test is attached below:

e2a0a696c9367dcb26c08036e113c96d2830ce36

modus-themes--standard-completions

Got this after the last reload-update.

symbol's function definition is void: modus-themes--standard-completions

Package version: modus-themes-20220227.1815

Please advise.

Modus operandi should use bold when possible

I'm noticing that the modus operandi theme does not use bold very much.

See this snippet of code on the spacemacs light theme:

Notice that "Vcpu", "Ordering::Release", "VCPU_RTSIG_OFFSET", "handle_signal", "register_kick_signal_handler" are all in bold. This makes the code more readable.

In the modus operandi theme bold never seems to be used at all:

Suggestion: Modus themes should use bold judiciously to give emphasis to things like function names, module names, constants etc.

Placing cursor on matched characters `{`, `}`, `(`, `)` etc. causes the character to dissappear

I'm using emacs 29.0.50, with modus operandi 2.0.0 with pgtk (pure gtk). (BTW I am able to repeat the issue with emacs 28.0.90 also)

When I place my cursor on a character which matches e.g. {, }, (, ), <, >, the character becomes invisible and I can only see the cursor. I need to move my cursor away to reveal the character again.

My expectation is that the character should still display, even though the cursor is on it.

This might be a strange interaction with spacemacs. I'm not sure what is causing this issue.

Changing from operandi to vivendi has effect on agenda

When I change from operandi to vivendi theme there's a strange effect on my agenda:

I use org-gcal to sync my org-agenda with my google calendar.

So when I use operandi theme and I open my agenda, everything is fine and my google events are displayed.

But when I change to the dark theme (vivendi) via F5 and I re-open my agenda, it won't display my org-gcal events - but only the agenda events from my "local" org-files.

P.S.: And a big "Thank You!" for all your precious work - I just love your Videos and your themes are the best - the only themes I use.

(wrong-number-of-arguments (1 . 2) 8)

Hi, thanks for the great package.

I have a question about this error:

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 2) 8)
  #f(compiled-function (theme &optional doc) "Declare THEME to be a Custom theme.\nThe optional argument DOC is a doc string describing the theme.\n\nAny theme `foo' should be defined in a file called `foo-theme.el';\nsee `custom-make-theme-feature' for more information." #<bytecode 0x45107dcedbeed62>)(modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus)
  (deftheme modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus)
  (progn (unless (and (fboundp 'require-theme) load-file-name (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) (require 'modus-themes)) (deftheme modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus) (modus-themes-theme modus-operandi) (provide-theme 'modus-operandi))
  eval((progn (unless (and (fboundp 'require-theme) load-file-name (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) (require 'modus-themes)) (deftheme modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus) (modus-themes-theme modus-operandi) (provide-theme 'modus-operandi)) t)
  #f(compiled-function (&rest body) "Like `progn', but evaluates the body at compile time and at load time.\nIn interpreted code, this is entirely equivalent to `progn',\nexcept that the value of the expression may be (but is not\nnecessarily) computed at load time if eager macro expansion is\nenabled." #<bytecode 0x28f163835163fd9>)((unless (and (fboundp 'require-theme) load-file-name (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) (require 'modus-themes)) (deftheme modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus) (modus-themes-theme modus-operandi) (provide-theme 'modus-operandi))
  (eval-and-compile (unless (and (fboundp 'require-theme) load-file-name (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) (require 'modus-themes)) (deftheme modus-operandi "Elegant, highly legible and customizable light the..." :background-mode 'light :kind 'color-scheme :family 'modus) (modus-themes-theme modus-operandi) (provide-theme 'modus-operandi))

which I encountered when I load the package.
Is there anything I can do to prevent this error?

Emacs Version

GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32)

OS

Windows 10

modus-them version

modus-themes-20221121.301

init.el

(use-package modus-themes
  :ensure
  :init
  ;; Add all your customizations prior to loading the themes
  (setq modus-themes-italic-constructs t
        modus-themes-bold-constructs nil
        modus-themes-region '(bg-only no-extend))

  ;; Load the theme files before enabling a theme
  (modus-themes-load-themes)
  :config
  ;; Load the theme of your choice:
  (modus-themes-load-vivendi) ;; OR (modus-themes-load-operandi)
  :bind ("<f5>" . modus-themes-toggle))

Others

Possibly related to this commit.

Thanks in advance.

Indistinct background color in swiper candidates

image

The current selected candidate is somehow hard to distinguish in the swiper candidates due to the background color of org src blocks, it can be reproduced with following theme configurations:

(use-package modus-themes
      :init
      (setq modus-themes-bold-constructs t
            modus-themes-syntax '(alt-syntax green-strings yellow-comments)
            modus-themes-links '(neutral-underline background)
            modus-themes-hl-line '(intense)
            modus-themes-markup '(intense background)
            modus-themes-paren-match '(intense)
            modus-themes-org-blocks 'gray-background)
      :config
      (modus-themes-load-vivendi))

undesirable colors in magit buffers on operandi

hi, prot. i hope this message finds you well. i have found somewhat of an undesirable color rendering given the typical conventions of magit. i am unsure as to whether this is more general, but it certainly occurs in these two scenarios:

when i check the magit diff in operandi, say, during a commit, the old lines (conventionally red) appear grey until i point point to within this section

when i need to apply a flag to an operation, eg a put force, the remaining, non-flag lines are not greyed out to indicate usage of the flags

neither of these cases presents when using vivendi. i am not sure if this is simply a byproduct of adherence to the AAA standard, but i found this to force me into using vivendi on most occasions

let me know what you think

ement-room-mention face is empty

Hi Prot,

I've been enjoying using the Modus themes lately while working on Ement.el. Just now I noticed that the ement-room-mention face is themed to empty:

`(ement-room-mention (( )))
I understand that you probably wanted to change it from the default that uses inverse-video (it was easy and gets the job done of attracting the user's attention, but I'm not attached to it), but making the face empty means that mentions are effectively nullified, so they don't stand out at all. It's also unexpected for the user, as I'm trying to loosely emulate the official client, Element, in Emacs terms.

Could we find a better theming for this face?

Thanks for your work.

Invalid face attribute :background nil

The Invalid face attribute :background nil error increase with mouse scroll
My config:

(leaf modus-themes
      :doc "https://protesilaos.com/modus-themes/"
      :load-path "~/.emacs.d/site-lisp/packages/modus-themes"
      :require t
      :commands (modus-themes-load-themes)
      :custom ((modus-themes-italic-constructs . t)
	       (modus-themes-bold-constructs . nil)
	       (modus-themes-region . '(bg-only no-extend))
	       (modus-themes-lang-checkers . '(background text-also straight-underline))
	       (modus-themes-links . '(faint))
	       (modus-themes-mode-line . '(accented borderless)))
      :init
      ;; Load the theme files before enabling a theme
      (modus-themes-load-themes)
      )

image

Tab group faces need further distinction

Hi Prot,

I've been experimenting with Emacs 27+ tab-bar features, and I noticed that, when using tab-bar groups, the face of a tab group is the same as that of a grouped, active tab, so the two types of tab (a group tab and an tab within the group) can't be distinguished.

For example, here's what the tab bar looks like with a selected tab group, with the faces as defined by modus-operandi:

tg1

The first white tab is a tab group, currently selected, and the second white tab is the selected tab within that group. But since they look the same, it's not obvious that they are actually two different kinds of tab, and that one is within the group defined by the first one.

After enabling boxes for the tab-group faces, it looks like this:

tg2

Now the group tab has a box, so it can be distinguished from the selected tab within its group.

I don't know if using boxes is the best way to distinguish group tabs from non-group tabs; it looks good to me, but I'll leave that decision up to you. :)

Thanks for your work on these themes!

Which Emacs are the themes compatible with?

I was trying to install this into Aquamacs (a mac-specific Emacs port), which is lagging (it's based on GNU Emacs 25.3.50.1). Should I be able to load the modus-themes? I tried, but modus-themes uses if-let*, which isn't in the subr-x.el I have.

Using `modus-theme-toggle` causes my `org-capture` templates to disappear

Hej prot :)

After being confused for quite a while as to why suddenly my org-capture-templates are gone, I just realized this is due to my switching between modus-vivendi and modus-operandi.

Curiously, while those templates defined in a separate file with separate (use-package ...) declaration disappear, the template defined in custom-set-variables is still there after a theme switch.

This is the code of my (use-package) declaration, and an utility function which I don't know is at all related to this (but the more information the better I guess).

(defun org-sort-agenda-files-after-capture ()
  (mapcar #'(lambda (file)
	      (with-current-buffer (find-file file)
		(mark-whole-buffer)
		(org-sort-entries nil ?p)
		(save-buffer)
		(kill-buffer)))
	  org-agenda-files))

(use-package org-capture
  :straight nil
  :config
  (setq org-capture-bookmark nil)
  (setq org-capture-templates
	'(("d" "TO[D]O" entry (file "~/notes/org/todos.org")
	   "* TODO [#%^{Prio, A-C}] %^{Inhalt} %^g"
	   :prepend t
	   :empty-lines-before 1)
	  ("t" "[T]agebuch" entry (file "~/notes/org/tagebuch.org")
	   "* *%^{Ort}*, %T\n%?"
	   :prepend t
	   :empty-lines-after 1)
	  ("z" "[Z]itat" entry (file "~/notes/org/zitate.org")
	   "* %^{Zitat}\n:PROPERTIES:\n:Autor:in: %^{Autor:in}\n:Ursprung: %^{Ursprung}\n:END:"
	   :prepend t
	   :empty-lines-after 1)))
  :bind
  ("C-c c" . org-capture)
  :hook
  (org-capture-after-finalize . org-sort-agenda-files-after-capture))

Have a good day :)

Inverted themes

Hi, Prot!

I guess this request/question is a bit weird, but here we go :D

I read PDFs in Emacs and it's usual for these files to have a white background. Reading them at night is uncomfortable, so I usually invert colours on my operating system. That literally invert all colours in all applications. This way, the PDFs get way easier to read.

However, as a side effect, the Modus themes colours get different, of course. The result is not terrible, it's usable, but it's jarring since I'm used to the original themes.

So, I'm wondering if there's an easy way of inverting all colours definitions from a modus themes. That would make it look like the original theme again.

Any pointers in this direction? I suppose I'd need to copy the Modus themes and manually invert all of its colours definitions. Maybe there's an easier way...?

Suggest add the following emms faces.

(defun emms-browser-get-face (bdata)
  "Return a suitable face for BDATA."
  (let* ((type (emms-browser-bdata-type bdata))
         (name (cond
                ((or (eq type 'info-year)
                     (eq type 'info-genre)) "year/genre")
                ((eq type 'info-artist) "artist")
                ((eq type 'info-composer) "composer")
                ((eq type 'info-performer) "performer")
                ((eq type 'info-album) "album")
                ((eq type 'info-title) "track"))))
    (intern
     (concat "emms-browser-" name "-face"))))

Can't get the same look in doom-emacs for the operandi theme

From the screenshot here https://protesilaos.com/emacs/modus-themes-pictures
image

I can see the background of minibuffer is white.

But it looks a little bit darker when I use this theme in doom-emacs. I have tried many ways to find out where I can set the background color for the minibuffer but failed. The only thing I found is I can set the background for modus-themes-completion-selected, but I don't want to do that, since I think this is not a problem for modus.

This is the output of M-x with vertico enabled.

image

any help is appreciated.

Modus-Vivendi cursor wrong colour in new frame

When using the modus-vivendi theme, making a new frame renders the cursor invisible in some buffers.

Steps to reproduce:

  1. emacs -Q

  2. M-: (load-theme 'modus-vivendi nil)

  3. Write some text in the scratch buffer. The cursor is visible (although here the window is unfocused for the screenshot).
    image

  4. M-x: make-frame

In the same buffer the cursor is now invisible, despite being positioned on the 'p' of 'Example text':
image

I cannot reproduce the same issue with modus-operandi.

Info

  • emacs-version: "28.0.50"
  • modus themes commit: 7e204cf (most recent)

modus-themes--slant overspecifies slant attribute

The modus-themes-slant definition is the following (ref):

`(modus-themes-slant ((,class :inherit italic :slant ,@(modus-themes--slant))))

The modus-themes--slant function has this definition (ref):

(defun modus-themes--slant ()
  "Conditional use of italics for slant attribute."
  (if modus-themes-italic-constructs
      (list 'italic)
    (list 'normal)))

The function controls the face display by overriding the parent's slant with italic or normal.

This breaks if the user has configured the italic face to use oblique glyphs:

(set-face-attribute 'italic nil :slant 'oblique)

In that case the theme overrides the parent to be italic again, and the oblique glyphs never appear. (This is relevant for the Iosevka font family, which has italic and oblique variants.)

If the function used unspecified in place of italic, things ought to work as expected for all cases.

(defun modus-themes--slant ()
  "Conditional use of italics for slant attribute."
  (if modus-themes-italic-constructs
      (list 'unspecified)
    (list 'normal)))

Info title faces fixed vs variable pitch

Hi Prot!
With Modus themes, the Info title faces become fixed pitch and regular height by default. That is surprising, because the default pitch and height choices work well to achieve a rather pleasant presentation of Info documents. It is one of the rare places where variable pitch is mixed with fixed pitch out of the box.

I would like to keep it that way. Is there an easy way to achieve that without modifying headline scaling and pitch across the board? I don't want to set modus-themes-variable-pitch-headings=t mainly because I view org files more as source/working documents that may optionally get exported to a presentation format like PDF, HTML (or Info for that matter).

I can see some hacky ways of undoing what modus-themes have done to info-title-x faces. Before I do that, would you consider adding an option or a new value (e.g. modus-themes-variable-pitch-headings=default) to keep the info-title faces variable pitch with scaling? Or, more generally, provide a configurable list of faces to exclude from modification by modus-themes?

Thanks!
Peter

Cosmetic issue in manual when using `info+`

Hi, thanks for the great themes.

Just a heads up: I'm using the info+ package, via the straight/use-package incantation:

  (use-package info+
  :straight (info-plus :type git :host github :repo "emacsmirror/info-plus")
  :after info)

This results in the following colors when viewing the info pages for the Modus themes:
quotes

As can be seen, the quotes are colored in a pretty ugly way, since the opening quotes are backticks and the closing quotes are apostrophes.

If you can think of a simple solution to this (except for disabling info+ πŸ˜„), it would be nice...

feature request: explicitly load theme

hi prot, i hope you are well

i was just wondering if you could add (interactive) to the load-operandi and load-vivendi functions, so they may be explicitly accessed by eg M-x

Error?

Hi, i was happily customizing my modus themes, suddenly something happened and they work run like before (maybe i updated a package or messed up use-packge syntax). It literally happedn while i was customizing and eval-buffering customizations

Error from compilation

Leaving directory β€˜/home/user/.emacs.d/elpa/modus-themes-20220920.539’

Compiling file /home/user/.emacs.d/elpa/modus-themes-20220920.539/modus-operandi-theme.el at Tue Sep 20 19:20:52 2022
Entering directory β€˜/home/work/.emacs.d/elpa/modus-themes-20220920.539/’
modus-operandi-theme.el:55:2: Error: Wrong type argument: listp, t

Compiling file /home/user/.emacs.d/elpa/modus-themes-20220920.539/modus-themes.el at Tue Sep 20 19:20:52 2022

Compiling file /home/user/.emacs.d/elpa/modus-themes-20220920.539/modus-vivendi-theme.el at Tue Sep 20 19:20:52 2022
modus-vivendi-theme.el:55:2: Error: Wrong type argument: listp, t

error when trying to modify modus themes -

β›” Error (use-package): consult/:config: consult--source-file is neither a Consult command nor a Consult source
β›” Error (use-package): modus-themes/:config: Eager macro-expansion failure: (wrong-type-argument listp t)

use package config

(use-package modus-themes
  :ensure
  :custom
  (modus-themes-bold-constructs t)
  (modus-themes-italic-constructs t)
  (modus-themes-syntax '(alt-syntax green-strings))
  (modus-themes-mode-line '(moody accented borderless))
  (modus-themes-tabs-accented t)

  (modus-themes-completions
      '((matches . (extrabold background))
        (selection . (semibold accented))
        (popup . (accented))))

  (modus-themes-fringe 'subtle)
  (modus-themes-lang-checkers '(text-also straight-underline))
  (modus-themes-hl-line '(accented))
  (modus-themes-subtle-line-numbers t)
  (modus-themes-markup t)
  (modus-themes-paren-match '(bold))

  :config

  (load-theme 'modus-operandi)
  (load-theme 'modus-operandi)
  (enable-theme 'modus-operandi))

i can't seem to figure out if this is a theme error or an error on my part with some config, thus opening an issue.

modus-vivendi vs ef-dark

Hello @protesilaos

with the last update of modus-themes I noticed these grey borders within modus-vivendi. I load the theme with

(load-theme 'modus-vivendi t)

modus-vivendi

These grey borders are shown with modus-operandi, too.

I changed the theme to ef-dark (or any other ef-theme):

(load-theme 'ef-dark t)

and there are no grey borders:

ef-dark

I don't know what may have caused this issue within modus-vivendi and modus-operandi.

Thanks a lot for your great work. This week we have holidays in Austria so I will have time to send you this email about philosophy.
Have a nice day,
Matthias

Title: Elisp To Compute Contrast Ratio?

Description: Emacs has some elisp libraries for color conversion among
various color coordinates, and there is the excellent name-this-color
package on melpa. However, none of these can compute contrast ratio
best I can tell. So how are you doing this for the modus themes? If
it's there and I'm missing it, I'd like a pointer; otherwise it would
be nice to have an elisp contrast compute function so that over time,
other theme authors can at least verify if their color contrasts are
good for accessibility.

Title: Do The Same For Fonts Too?

Description: First off, kudos on an awesome piece of work from an
Accessibility perspective. Now that Emacs has harfbuz as a
text-shaping engine, the font choices on Linux are rich and
high-quality. This presents an opportunity to create a theme that also
picks the right font for low-vision users, users with dislexia
etc. Note that there is no single font choice for all category of
users, but providing a small set of choices that have been tried
might get more users with special users tarted. Note: I myself
cannot see at all -- I use speech output exclusively, but the number
of users who benefit from color and font accessibility far outnumber
totally blind users.

error on theme loading

Hi Prot!

When I load the theme I get a warning: Wrong type argument: listp, subtle

the directory name is modus-themes-20220131.164. If I launch into emacs -q and go View -> customize and set the theme, it does load (but this is probably loading the emacs built-in version?)

I'm on

emacs --version
GNU Emacs 28.0.90
Copyright (C) 2021 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

here's the full stacktrace:

Debugger entered--Lisp error: (wrong-type-argument listp subtle)
  modus-themes--prompt("#6ae4b9" "#00bcff" "#a8a8a8" "#041529" "#242679" "#ffffff" "#191a1b" "#323232")
  (cons class (modus-themes--prompt cyan-alt-other blue-alt-other fg-alt cyan-nuanced-bg blue-refine-bg fg-main bg-alt bg-active))
  (list (cons class (modus-themes--prompt cyan-alt-other blue-alt-other fg-alt cyan-nuanced-bg blue-refine-bg fg-main bg-alt bg-active)))
  (list 'modus-themes-prompt (list (cons class (modus-themes--prompt cyan-alt-other blue-alt-other fg-alt cyan-nuanced-bg blue-refine-bg fg-main bg-alt bg-active))))
  (custom-theme-set-faces 'modus-vivendi (list 'modus-themes-subtle-red (list (list class ':background red-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-green (list (list class ':background green-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-yellow (list (list class ':background yellow-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-blue (list (list class ':background blue-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-magenta (list (list class ':background magenta-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-cyan (list (list class ':background cyan-subtle-bg ':foreground fg-dim))) (list 'modus-themes-subtle-neutral (list (list class ':background bg-inactive ':foreground fg-inactive))) (list 'modus-themes-intense-red (list (list class ':background red-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-green (list (list class ':background green-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-yellow (list (list class ':background yellow-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-blue (list (list class ':background blue-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-magenta (list (list class ':background magenta-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-cyan (list (list class ':background cyan-intense-bg ':foreground fg-main))) (list 'modus-themes-intense-neutral (list (list class ':background bg-active ':foreground fg-main))) (list 'modus-themes-refine-red (list (list class ':background red-refine-bg ':foreground red-refine-fg))) (list 'modus-themes-refine-green (list (list class ':background green-refine-bg ':foreground green-refine-fg))) (list 'modus-themes-refine-yellow (list (list class ':background yellow-refine-bg ':foreground yellow-refine-fg))) (list 'modus-themes-refine-blue (list (list class ':background blue-refine-bg ':foreground blue-refine-fg))) (list 'modus-themes-refine-magenta (list (list class ':background magenta-refine-bg ':foreground magenta-refine-fg))) (list 'modus-themes-refine-cyan (list (list class ':background cyan-refine-bg ':foreground cyan-refine-fg))) (list 'modus-themes-active-red (list (list class ':background red-active ':foreground bg-active))) (list 'modus-themes-active-green (list (list class ':background green-active ':foreground bg-active))) (list 'modus-themes-active-yellow (list (list class ':background yellow-active ':foreground bg-active))) (list 'modus-themes-active-blue (list (list class ':background blue-active ':foreground bg-active))) (list 'modus-themes-active-magenta (list (list class ':background magenta-active ':foreground bg-active))) (list 'modus-themes-active-cyan (list (list class ':background cyan-active ':foreground bg-active))) (list 'modus-themes-nuanced-red (list (cons class (cons ':background (cons red-nuanced-bg '...))))) (list 'modus-themes-nuanced-green (list (cons class (cons ':background (cons green-nuanced-bg '...))))) (list 'modus-themes-nuanced-yellow (list (cons class (cons ':background (cons yellow-nuanced-bg '...))))) (list 'modus-themes-nuanced-blue (list (cons class (cons ':background (cons blue-nuanced-bg '...))))) (list 'modus-themes-nuanced-magenta (list (cons class (cons ':background (cons magenta-nuanced-bg '...))))) (list 'modus-themes-nuanced-cyan (list (cons class (cons ':background (cons cyan-nuanced-bg '...))))) (list 'modus-themes-fringe-red (list (list class ':background red-fringe-bg ':foreground fg-main))) (list 'modus-themes-fringe-green (list (list class ':background green-fringe-bg ':foreground fg-main))) (list 'modus-themes-fringe-yellow (list (list class ':background yellow-fringe-bg ':foreground fg-main))) (list 'modus-themes-fringe-blue (list (list class ':background blue-fringe-bg ':foreground fg-main))) (list 'modus-themes-fringe-magenta (list (list class ':background magenta-fringe-bg ':foreground fg-main))) (list 'modus-themes-fringe-cyan (list (list class ':background cyan-fringe-bg ':foreground fg-main))) (list 'modus-themes-special-cold (list (list class ':background bg-special-cold ':foreground fg-special-cold))) (list 'modus-themes-special-mild (list (list class ':background bg-special-mild ':foreground fg-special-mild))) (list 'modus-themes-special-warm (list (list class ':background bg-special-warm ':foreground fg-special-warm))) (list 'modus-themes-special-calm (list (list class ':background bg-special-calm ':foreground fg-special-calm))) ...)
  (let* ((class '...) (g80 (modus-themes--palette ...)) (bg-main (alist-get ... g80)) (fg-main (alist-get ... g80)) (bg-dim (alist-get ... g80)) (fg-dim (alist-get ... g80)) (bg-alt (alist-get ... g80)) (fg-alt (alist-get ... g80)) (bg-active (alist-get ... g80)) (fg-active (alist-get ... g80)) (bg-inactive (alist-get ... g80)) (fg-inactive (alist-get ... g80)) (bg-active-accent (alist-get ... g80)) (bg-special-cold (alist-get ... g80)) (fg-special-cold (alist-get ... g80)) (bg-special-mild (alist-get ... g80)) (fg-special-mild (alist-get ... g80)) (bg-special-warm (alist-get ... g80)) (fg-special-warm (alist-get ... g80)) (bg-special-calm (alist-get ... g80)) (fg-special-calm (alist-get ... g80)) (red (alist-get ... g80)) (red-alt (alist-get ... g80)) (red-alt-other (alist-get ... g80)) (red-faint (alist-get ... g80)) (red-alt-faint (alist-get ... g80)) ...) (custom-theme-set-faces 'modus-vivendi (list 'modus-themes-subtle-red (list ...)) (list 'modus-themes-subtle-green (list ...)) (list 'modus-themes-subtle-yellow (list ...)) (list 'modus-themes-subtle-blue (list ...)) (list 'modus-themes-subtle-magenta (list ...)) (list 'modus-themes-subtle-cyan (list ...)) (list 'modus-themes-subtle-neutral (list ...)) (list 'modus-themes-intense-red (list ...)) (list 'modus-themes-intense-green (list ...)) (list 'modus-themes-intense-yellow (list ...)) (list 'modus-themes-intense-blue (list ...)) (list 'modus-themes-intense-magenta (list ...)) (list 'modus-themes-intense-cyan (list ...)) (list 'modus-themes-intense-neutral (list ...)) (list 'modus-themes-refine-red (list ...)) (list 'modus-themes-refine-green (list ...)) (list 'modus-themes-refine-yellow (list ...)) (list 'modus-themes-refine-blue (list ...)) (list 'modus-themes-refine-magenta (list ...)) (list 'modus-themes-refine-cyan (list ...)) (list 'modus-themes-active-red (list ...)) (list 'modus-themes-active-green (list ...)) (list 'modus-themes-active-yellow (list ...)) (list 'modus-themes-active-blue (list ...)) ...) (custom-theme-set-variables 'modus-vivendi '(ansi-color-faces-vector ...) (list 'ansi-color-names-vector (apply ... ...)) (list 'awesome-tray-mode-line-active-color blue) (list 'awesome-tray-mode-line-inactive-color bg-active) (list 'exwm-floating-border-color fg-window-divider-inner) '(flymake-error-bitmap ...) '(flymake-warning-bitmap ...) '(flymake-note-bitmap ...) '(ibuffer-deletion-face ...) '(ibuffer-filter-group-name-face ...) '(ibuffer-marked-face ...) '(ibuffer-title-face ...) (list 'hl-todo-keyword-faces (list ... ...)) (list 'pdf-view-midnight-colors (list ... ...)) '(vc-annotate-background nil) '(vc-annotate-background-mode nil) (list 'vc-annotate-color-map (list ... ...)) '(vc-annotate-very-old-color nil) (list 'xterm-color-names (apply ... ...)) (list 'xterm-color-names-bright (apply ... ...)) (if (or ... ...) '... '...)))
  load-theme(modus-vivendi)
  (progn (load-theme 'modus-vivendi))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

EDIT: here is my modus-themes config, it has nothing special I think...

Why are level 1 headers white in dark version?

Hi. First, thanks for creating modus-themes.

The issue is that level-1 org-mode/markdown/etc headers are white in the dark version of modus-themes, resulting in no color contrast compared to the body text.

Example:

image

I'm sure this is customizable, I'm just wondering why this is the default.

geiser-mode error

Hi, there is error if geiser-mode enabled,

Debugger entered--Lisp error: (wrong-type-argument listp `)

I think need to remove typo, sign ` in defconst modus-themes-faces .

Agda: Theme does not impact syntax highlighting

Hi, I first just wanted to thank you for the excellent themes!

When using agda, you can load a file (with C-x C-c C-l) which colours the buffer, however when using the modus-themes (and ef-themes), the colours don't seem to change from their "default" colours, which impacts visibility.

However, I noticed that while experimenting with doom-themes, the highlighting corresponds to the theme used. I'm not sure if this is because of an upstreamagda issue or a modus thing though.

I found this issue in the agda repo which seems to imply it might be an agda thing: agda/agda#5917

Addressing the syntax highlighting situation. The current approach has difficulties with certain themes, making it difficult to read or recognize some of the things that Agda wishes to point out. To this end I'd like to investigate if setting agda2-highlight-face-groups to default-faces is feasible.

Here are some screenshots and comparisons:

Screenshots

modus-vivendi

image

modus-operandi

image

ef-bio

image

ef-tritanopia-dark

image

doom-vibrant

image

doom-moonlight

image

doom-one

image

doom-one-light

image

Here's a portion of the file used for the images:

module demo where

open import Relation.Binary.PropositionalEquality
open import Data.Nat

data List (A : Set) : Set where
  empty : List A
  add   : A β†’ List A β†’ List A

-- The list 1, 3, 2

ex1 : List β„•
ex1 = add 1 (add 3 (add 2 empty))

append : {A : Set} β†’ List A β†’ List A β†’ List A
append empty ys = ys
append (add x xs) ys = add x (append xs ys)

-- A test of append

ex2 : append (add 1 (add 5 (add 3 empty)))
             (add 2 (add 4 empty))
      ≑
      (add 1 (add 5 (add 3 (add 2 (add 4 empty)))))
ex2 = refl

append-empty-left : {A : Set} β†’ forall (xs : List A) β†’ append empty xs ≑ xs
append-empty-left xs = refl

New Update

With the new update of the modus themes Emacs asks at every start: Loading a theme can run Lisp code. Really load?

In the message buffer this issue: "Setting β€˜custom-safe-themes’ temporarily since "emacs -q" would overwrite customizations".

How can I fix this? I've installed the themes via melpa....

Thanks a lot.

Feature Request - iPython Notebooks

Hi Prot, hope you are doing well.

Modus-themes is already extremely complete, but I would like to request the addition of faces from the emacs-ipython-notebook package. The default doesn't really look great (see below):

Screenshot 2022-05-23 at 11 10 59

Thank you for your work on modus themes.
Cheers,
Max.

Invalid face attribute while using centaur-tabs

Hi @protesilaos ,
I am not sure if you are still active in github.

I am reporting a bug here until figure out how to report one on SourceHut.

My *Messages* buffer is flooded with error when using centaur-tabs below -

Invalid face attribute :foreground nil
Invalid face attribute :background nil [5 times]

Theme used - modus-vivendi

I am not sure where this bug needs to be fixed, so I opened a issue in centaur-tabs repo as well.

ema2159/centaur-tabs#187

probably this issue similar to the issue below - ema2159/centaur-tabs#102

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.