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

Nord theme for kpm-list #99

Open
TRSx80 opened this issue Apr 16, 2020 · 2 comments
Open

Nord theme for kpm-list #99

TRSx80 opened this issue Apr 16, 2020 · 2 comments

Comments

@TRSx80
Copy link

TRSx80 commented Apr 16, 2020

Good day!,

I have really been enjoying Nord! Now I am at the point of starting to tweak little things here and there.

One of the most glaring things (at least on my own setup) that was standing out (theme wise) was kpm-list which is an intelligent grouped buffer list, that I have been using for some years now and couldn't live without. But the default colors were absolutely clashing with Nord. It was jarring, and that is a buffer that I use quite a lot.

So last night, I decided to sit down and fix that. I think that what I came up with was pretty workable:

2020-04-16_024024_screenshot_sanitized

All the credit goes to @arcticicestudio (and others (are there any others?)) for picking out a really nice color palette and writing some great documentation which makes it really easy for even a total sperg like myself to adapt/apply them to new situations and places. Thanks again for all your effort. And for sharing. 🍻

I had made a thread over there at kpm-list last night but figured I would make another here, too. I can't imagine that the union in the Venn diagram between the two projects is a very large number of people 😄 but you never know. Anyway a little cross pollination / promotion is never bad for great F/LOSS projects anyway. 😉 Maybe some people finds one or the other project useful.

I am not even sure I did this "properly" (any Emacs theming tips are welcomed!) but I got it to work by putting the following in my Emacs init to override the defaults.

Of course you can set the colors directly by hex value, but I find this way of aliasing them easier to work with. Especially when "playing around" and tweaking things. Just make sure you assign the color palette variables (nord0...16) earlier on in the init loading then when you need to use them (in case you end up using them in multiple places to override other things as well, like I do).

  ;; Ripped from:
  ;; https://github.com/arcticicestudio/nord-vim/blob/develop/colors/nord.vim
  ;; as it was most faithful (that I found in 5 second search ;) ) to:
  ;; https://www.nordtheme.com/docs/colors-and-palettes
  ;; whilst having easiest format to modify to my needs

  ;; Dark Backgrounds "Polar Night"
  (setq nord0 "#2E3440") ; darkest
  (setq nord1 "#3B4252")
  (setq nord2 "#434C5E")
  (setq nord3 "#4C566A") ; lightest

  ;; Light Backgrounds "Snow Storm"
  (setq nord4 "#D8DEE9") ; darkest
  (setq nord5 "#E5E9F0")
  (setq nord6 "#ECEFF4") ; lightest

  ;; Heart Palette (bluish colors) "Frost"
  (setq nord7 "#8FBCBB") ; lightest / highest contrast
  (setq nord8 "#88C0D0") ; primary UI elements
  (setq nord9 "#81A1C1") ; secondary UI elements
  (setq nord10 "#5E81AC") ; darkest / lowest contrast, tertiary

  ;; Colorful Accents "Aurora"
  (setq nord11 "#BF616A") ; reddish
  (setq nord12 "#D08770") ; orangeish
  (setq nord13 "#EBCB8B") ; yellowish
  (setq nord14 "#A3BE8C") ; greenish
  (setq nord15 "#B48EAD") ; purpleish

  (set-face-attribute 'kpm-list-buffer-face nil
		      :foreground nord4)

  (set-face-attribute 'kpm-list-buffer-highlight-face nil
		      :foreground nord14)

  (set-face-attribute 'kpm-list-directory-face nil
		      :foreground nord8)

  (set-face-attribute 'kpm-list-header-face nil
		      :background nord1
		      :foreground nord7)

  (set-face-attribute 'kpm-list-mode-face nil
		      :foreground nord7)

  (set-face-attribute 'kpm-list-modified-face nil
		      :foreground nord11)

  (set-face-attribute 'kpm-list-old-path-face nil
		      :foreground nord10)
@arcticicestudio
Copy link
Contributor

arcticicestudio commented Apr 28, 2020

Hi @TRSx80 👋, thanks for your contribution 👍
Again a great and detailed documentation 😉

Adding support for other packages is always welcome.
Your prototype already looks great. The only part I'd change is to use nord8 instead of nord7 for the section headings since it's the main accent color.
Feel free to submit a PR so we can review and merge it into the theme. The color palettes are also already exist as constants so you can simply reuse them.


Regarding the "are there any other" question: Everyone who contributes to a open source project is part of it, regardless of whether it's code via a PR, issues/reports or commenting on issues.
This account name might be indeed a bit confusing, but you can find me at @svengreb 😊
Some background info about this is documented on my sponsors page, but there will be many more details in an upcoming information article/blog/Reddit post as well as on my website (when I finally find some time to build it 😆)

@TRSx80
Copy link
Author

TRSx80 commented May 1, 2020

The only part I'd change is to use nord8 instead of nord7 for the section headings since it's the main accent color.

I actually played with that quite a bit, IIRC. If you look closely, there is some differentiation between regular directory font, old-path-face, etc. and I think I simply ran out of options/colors, or I couldn't get it to "look right" or... differentiation, or... something (it's been a little while now)? Maybe it was that I started off by matching the default dired (directory editor, the Emacs file manager) directory color, for consistency reasons. Anyway, if/when I circle back to this, I will definitely take your feedback into account on my second pass, so thanks.

Also, after I posted this, I realized that perhaps the better approach would be to talk to the kpm-list creator about maybe re-mapping his hard-coded colors to the "standard" alias ones in Emacs so they would automatically pick up whatever theme the user enabled. Because most packages in Emacs seem to do it that way. The couple times I changed themes the last few years, however, that package was always the only one standing out with it's own hard-coded separate theme.

Failing that, I will come back and re-visit this, perhaps submit a PR, etc. In the meantime, anyone needing it is free to copy-paste what I posted and use it in their init file. Everyone wins. I just prefer to take the time and do the "right" approach. Cheers!

@arcticicestudio arcticicestudio added the Hacktoberfest This repository participates in the Hacktoberfest label Oct 8, 2020
@arcticicestudio arcticicestudio removed the Hacktoberfest This repository participates in the Hacktoberfest label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants