Skip to content
/ haki Public

🎨 Pleasant, Dark theme in Modern Sense for Emacs

License

Notifications You must be signed in to change notification settings

idlip/haki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎇 Haki - An Elegant, High-contrast Dark Theme in Modern sense

GNU Emacs MELPA

I might no longer maintain this theme

Note: As on [2025-01-19], I realized I did recreate a wheel, after reading up modus-themes, I remark that modus-themes is a masterpiece. Lots of options, and it can be override.

The main reason I created haki-theme was to use pitch black background for my oled laptop, and to have punchy colors with modern suite of emacs packages. I realized that this was simple, so simple overriding vivendi theme gave me almost equivalent results.

I suggest y’all to take your time and go through M-x modus-themes-list-colors and modify the palette as you like. Please kindly read up the info manual for modus-themes (it should be built-in to emacs)

Truly modus-themes is a masterpiece which can craft any theme as preferred.

So far here’s the config I came up to almost replace my haki-theme

  • I will be using this, and adding more changes which seems replacing of it.
(use-package modus-themes
  :init
  (require-theme 'modus-themes)
  :custom
  (modus-themes-italic-constructs t)
  (modus-themes-bold-constructs t)
  (modus-themes-mixed-fonts t)
  (modus-themes-variable-pitch-ui t)
  (modus-themes-custom-auto-reload t)
  (modus-themes-disable-other-themes t)
  (modus-themes-prompts '(italic bold))
  (modus-themes-completions
   '((matches . (extrabold))
     (selection . (semibold italic text-also))))

  (modus-themes-org-blocks 'gray-background)

  (modus-themes-headings
   '((1 . (variable-pitch 1.5))
     (2 . (1.3))
     (agenda-date . (1.3))
     (agenda-structure . (variable-pitch light 1.8))
     (t . (1.1))))


  (modus-vivendi-palette-overrides
   '(

     (bg-main     "#000000")
     (bg-dim      "#111111")
     (bg-active   "#222222")
     (bg-inactive "#333333")

     (fg-main     "#ffffff")
     (fg-dim      )

     (cursor      "#00ffff")
     (warning     "#fafad2")

     (bg-completion "#2e8b57")
     (bg-region     bg-active)
     (bg-tab-bar        bg-main)
     (bg-tab-current    bg-active)
     (bg-tab-other      bg-dim)
     (fringe unspecified)
     (bg-mode-line-active bg-dim)
     (border-mode-line-active unspecified)
     (bg-line-number-active  bg-main)
     (bg-line-number-inactive  bg-main)
     ))

  :config
  (load-theme 'modus-vivendi t))

Table of Palette

Info

This is not any normal theme that looks “huh”.

This is tailored for Emacs in modern sense, with each element to look distinguishable and go in sync.

There is not much science or principle here, it’s just a theme and its your eyes, if they go in sync, whoami to stop?

As a new theme, I have two things in my mind:

  • If community or many users, like the theme, I might go tweak and add more goodies.
  • If there is not much appreciation, I might modify and improve some pastel colors.

Modes Supported

Packages & Modes
  • Vertico, Corfu, Consult, Orderless, Marginalia
  • Magit, diff
  • Treesit (tree-sitter)
  • Org-Modern
  • Elfeed
  • Flycheck & Flymake
  • Info-mode
  • Mingus
  • Which-key
  • Org-mode
  • Markdown-mode
  • Eww, shr, shrface
  • Doom-Modeline
  • Rainbow-Delimiters
  • Jinx
  • Meow
  • Avy, sdcv
  • Vterm, EAT
  • Tabs, Centaur-Tabs
  • Solaire-mode

I dont use other packages, PR is well appreciated for other modes. You can open an issue for requesting a mode or package. I will try to implement it, if community likes to.

Gallery

Eye candy Gallery

Installation

Theme is available in MELPA.

;; Option 1: Simply do (make sure it is in 'custom-theme-directory')
(load-theme 'haki t)
(set-face-attribute 'haki-region nil :background "#2e8b57" :foreground "#ffffff")

;; Option 2: with 'use-package'
(use-package haki-theme
  :demand t
  :custom-face
  (haki-region ((t (:background "#2e8b57" :foreground "#ffffff"))))
  (haki-highlight ((t (:background "#fafad2" :foreground "#000000"))))
  :custom
   ;; If you skip setting this, it will use 'default' font.
  (haki-heading-font "Comic Mono")
  (haki-sans-font "Iosevka Comfy Motion")
  (haki-title-font "Impress BT")
  (haki-link-font "VictorMono Nerd Font") ;; or Maple Mono looks good
  (haki-code-font "Maple Mono") ;; inline code/verbatim (org,markdown..)
  (haki-bg-oled nil "Toggle pitch black OLED background.")

  :config
  ;; For meow/evil users (change border of mode-line according to modal states)
  (add-hook 'post-command-hook #'haki-modal-mode-line)

  (load-theme 'haki t))

Tips

Since its new, there is not much, but I do have some surprise!

  • Since regions cover everywhere, you can customize it to your preference.

Use M-x haki-change-region to choose and set a color for haki-region.

To make it persist on sessions, you need to set face for haki-region

  • Emacs on Terminal should support 24-bit colors.

It displays all colors for me on foot terminal. If you have issue, You can try setting ‘COLORTERM’ environment variable to “true-color” : export COLORTERM=truecolor

  • Heading level will be similar everywhere (org,markdown,eww,shr,info,news..), every heading faces inherit corresponding org-level. So if you don’t see those styles in any mode, please note that you may have to load org-mode. Will try to make it not depend on org-mode if possible.
  • For meow/evil users, there is #'haki-modal-mode-line which can change the border (:box) of the mode-line according to the meow-states, with this hook:
    (add-hook 'post-command-hook #'haki-modal-mode-line)
        
  • Just like a theme, if you are looking to try new font. I can suggest you to check Recursive font I use (fork) them patched with nerd icons in OnePiece style naming, check out Code D Font

Plan

  • [X] Avoid too much :inherit in faces.
  • [ ] Test full picture on org-agenda.
  • [ ] Make it to not conflict with user’s customization at all.
    • Idea is to define-faces haki-cyan-alt and use it for all faces.
    • So user can change anything and not worry about it affecting other faces.
  • [ ] Work on magit faces more.
  • [ ] ement and erc faces.
  • [ ] Give custom options for mode-line, tab-bar highlight to be in border or region or nil.

Change-log

<2023-12-22> version: 0.4

  • Major revamp, and fixes.
  • Fixed lot of inherit faces, fix inherit to not depend on external package.
  • Tried to minimize :inherit as there should be minimal conflict with user’s customization.
  • Most of the faces depended on org-mode, fixed it. So others may not wait until org-mode is loaded.

Contributing

There’s always a space for improvement.

  • If you want to open an issue, Please attach a pic of the issue state.
  • If you want to make a PR, Please attach pic of before and after effects.

    This will allow me to consider and evaluate.

Inspiration

  • Prot’s themes - I’m a fan of modus-vivendi, but it lacked something for me, it simply lead me to create this theme. Nonetheless, Modus themes is a Masterpiece.
  • Minad - If it were not for his packages, I wouldn’t have loved Emacs this much to create a theme. Absolute gem! Most of the theme’s customization is based on his packages.

Shout Outs

Thank you for the shout out and Appreciations! But note: I have just randomly chosen colors, it is not defined with any criteria.

About

🎨 Pleasant, Dark theme in Modern Sense for Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published