Giter Site home page Giter Site logo

oxcl / doom-gruvbox-material-theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cardoso1994/doom-gruvbox-material-theme

0.0 0.0 0.0 2.86 MB

Doom Emacs theme based on Gruvbox Material by @sainnhe

License: GNU General Public License v3.0

Emacs Lisp 100.00%

doom-gruvbox-material-theme's Introduction

doom-gruvbox-material

Introduction

Gruvbox Material is a modified version of Gruvbox, the contrast is adjusted to be softer in order to protect developers’ eyes.

This is a port of Gruvbox Material to be used in Doom Emacs. As the original, it has three palettes:

material
Carefully designed to have a soft contrast
mix
Color palette obtained by calculating the mean of the other two
original
The color palette used in the original gruvbox

additionally, it has three background contrast options: soft, medium and hard. Since the colorscheme comes in two variants: light and dark, this project provides a total of 18 possible configurations.

Installation

Copy the doom-gruvbox-material-theme.el and doom-gruvbox-material-light-theme.el files into your $HOME/.doom.d/themes directory. Add the following lines to your ~/.doom.d/config.el:

;; `gruvbox-material' contrast and palette options
(setq doom-gruvbox-material-background  "medium"  ; or hard (defaults to soft)
     doom-gruvbox-material-palette     "mix") ; or original (defaults to material)

;; `gruvbox-material-light' contrast and palette options
(setq doom-gruvbox-material-light-background  "medium" ; or hard (defaults to soft)
      doom-gruvbox-material-light-palette     "mix") ; or original (defaults to material)

;; set `doom-theme'
(setq doom-theme 'doom-gruvbox-material) ; dark variant
(setq doom-theme 'doom-gruvbox-material-light) ; light variant

Additionally, I have this function to automatically change the colorscheme depending on the time of the day:

(defun mac/timed-theme (&optional morning-theme night-theme)
  "Change doom-theme depending on time of the day. Runs every hour."
  (let* ((morning-theme (or morning-theme 'doom-solarized-light))
         (night-theme (or night-theme 'doom-solarized-dark))
         (hour (nth 2 (decode-time (current-time))))
         (theme (cond ((<= 7 hour 17)   morning-theme)
                      (t                night-theme))))
    (unless (equal doom-theme theme)
      (setq doom-theme theme)
      (load-theme doom-theme t))
    ;; run every hour
    (run-at-time (format "%02d:%02d" (+ hour 1) 0) nil
                 #'mac/timed-theme morning-theme night-theme)))

(mac/timed-theme 'doom-gruvbox-material-light
                 'doom-gruvbox-material)

Screenshots

All screenshots present the three color palettes with a medium contrast

Dark

Material

Elisp

./img/dark/material_elisp.png

Python

./img/dark/material_python.png

Org-mode

./img/dark/material_org.png

Mix

Elisp

./img/dark/mix_elisp.png

Python

./img/dark/mix_python.png

Org-mode

./img/dark/mix_org.png

Original

Elisp

./img/dark/original_elisp.png

Python

./img/dark/original_python.png

Org-mode

./img/dark/original_org.png

Light

Material

Elisp

./img/light/material_elisp.png

Python

./img/light/material_python.png

Org-mode

./img/light/material_org.png

Mix

Elisp

./img/light/mix_elisp.png

Python

./img/light/mix_python.png

Org-mode

./img/light/mix_org.png

Original

Elisp

./img/light/original_elisp.png

Python

./img/light/original_python.png

Org-mode

./img/light/original_org.png

Your own configuration

Doom allows for extra configuration, which can be achieved by using the custom-theme-set-faces! function. This will give you the ability to customize this color palette to any way you choose, for example:

(custom-theme-set-faces! '(doom-gruvbox-material doom-gruvbox-material-light)
  `(fill-column-indicator :foreground ,(doom-color 'bg-alt)
                          :background ,(doom-color 'bg-alt))
  `(font-lock-comment-face :foreground ,(doom-darken (doom-color 'teal) 0.2))
  `(org-document-info-keyword :foreground ,(doom-darken
                                            (doom-color 'green) 0.3))
  `(org-drawer :foreground ,(doom-darken (doom-color 'yellow) 0.25))
  `(org-link :foreground ,(doom-color 'teal) :underline t)
  `(show-paren-match :foreground ,(doom-color 'fg)
                     :background ,(doom-darken (doom-color 'orange) 0.5))
  `(org-block-begin-line :foreground ,(doom-color 'fg-alt)
                         :background ,(doom-color 'bg-alt))
  `(org-level-1 :foreground ,(doom-color 'violet) :weight bold :height 1.6)
  `(org-level-2 :foreground ,(doom-color 'orange) :weight bold :height 1.4)
  `(org-level-3 :foreground ,(doom-color 'magenta):weight bold  :height 1.2)
  `(org-level-4 :foreground ,(doom-color 'teal) :weight bold :height 1.1))

for more examples, you can always check the documentation ;).

doom-gruvbox-material-theme's People

Contributors

cardoso1994 avatar

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.