Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help users adapt faces of packages not covered by nord-emacs #118

Open
c-alpha opened this issue Jan 7, 2023 · 1 comment
Open

Help users adapt faces of packages not covered by nord-emacs #118

c-alpha opened this issue Jan 7, 2023 · 1 comment

Comments

@c-alpha
Copy link

c-alpha commented Jan 7, 2023

When using an Emacs theme, there will inevitably be packages in my configuration which are not covered by the theme. To get a uniform look&feel, I will need to look up the colour definitions in the theme's source code, and then say things like

(face-spec-set 'notmuch-cited-text '((((background light)) (:background "#434C5E"))
			             (((background dark))  (:background "#5E81AC"))))

in my configuration. This is due to the fact, that most themes (nord-emacs being one of this class) simply let-bind a set of clolour symbols, which are then used in an ocean of backtick expressions making up the arguments of a custom-theme-set-faces call. While this is convenient for the theme author(s), it keeps the colour symbols' visibility constrained to the theme's code itself, and thus inaccessible for the user. As a consequence, users will need to have a peek into the engine room to borrow the colours' RGB values, and "adorn" their configuration with (IMHO) unnecessarily wordy, and (due to the use of raw RGB values) hard to read face specifications.

Needless to say that this applies to the vast majority of Emacs themes, and none of it is specific to nord-emacs.

Notwithstanding that fact, I have added to nord-emsacs a prototype implementation of a mechanism, which allows users to put things like this in their configuration:

(use-package nord
  :ensure t
  :custom
  (nord-user-faces
   '((notmuch-search-count (:foreground nord9))
     (notmuch-search-date (:foreground nord-comment))
     (notmuch-tree-match-date-face (:foreground nord4))
     (notmuch-tree-no-match-date-face (:foreground nord-comment))
     (notmuch-search-matching-authors (:foreground nord4))
     (notmuch-tree-match-author-face  (:foreground nord4))
     (notmuch-search-non-matching-authors (:foreground nord-comment))
     (notmuch-tree-no-match-author-face   (:foreground nord-comment))))
  :config
  (load-theme 'nord t))

Before spending the time converting it into a PR, I felt that testing the grounds up front might seem called for. The reason being that, beyond offering more end-user convenience, it would open the door to users overriding the theme's design choices (since I can of course specify for- and background of - for instance - the default face in the nord-user-faces list).

Dear maintainers, what's your take on this? A welcome addition, or having the dog guard the sausages?

@c-alpha
Copy link
Author

c-alpha commented Jan 26, 2023

ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant