kuanyui / moe-theme.el

A customizable colorful eye-candy theme for Emacser. Moe, moe, kyun!
GNU General Public License v3.0
752 stars 60 forks source link

And more:

  1. Carefully-considered & reasonable colors
  2. Delightful & good-looking color palettes™
  3. Customizable
    • Optional =Monokai= / =Tomorrow= for syntax-highlighting (or totally customize by yourself)
    • Mode-line / Powerline color
    • Titles font sizes for .
  4. Fully-supported for each modes:
    • Diff / EDiff
    • Dired / Dired+
    • ERC / rcirc
    • Eshell / Ansi-term
    • Gnus / Message
    • Helm / ido
    • Org-mode / Agenda / calfw
    • Magit / Git-commit / Git-gutter
    • Markdown-mode / ReStructText-mode
    • Auto-complete-mode / Company
    • Rainbow-delimiters
    • Swoop
    • Twittering-mode
    • undo-tree / Neotree
    • Ruby / Haskell / CPerl / Tuareg / Web-mode
    • ......etc

** Requirements

** Download

*** Via package.el

=Moe-theme= is available in [[https://github.com/milkypostman/melpa][MELPA]] repository now, so you can install =moe-theme= easily with =M-x= =list-packages=.

*** Manually

Download the archive of =moe-theme= (or =git clone= it) to =~/.emacs.d/moe-theme.el= and extract it. Then, add these to your init file:

+BEGIN_SRC lisp

    ;;customize theme
    (add-to-list 'custom-theme-load-path "~/.emacs.d/moe-theme.el/")
    (add-to-list 'load-path "~/.emacs.d/moe-theme.el/")
    (require 'moe-theme)

+END_SRC

** Customizations

It's impossible to satisfy everyone with one fixed theme, but =moe-theme= provide some easy ways to customize itself.

There's a full customization example:

+BEGIN_SRC lisp

    ;; If you want to use powerline, (require 'powerline) must be
    ;; before (require 'moe-theme).
    (add-to-list 'load-path "~/.emacs.d/PATH/TO/powerline/")
    (require 'powerline)

    ;; Moe-theme
    (add-to-list 'custom-theme-load-path "~/.emacs.d/PATH/TO/moe-theme/")
    (add-to-list 'load-path "~/.emacs.d/PATH/TO/moe-theme/")
    (require 'moe-theme)

    ;; Show highlighted buffer-id as decoration. (Default: nil)
    (setq moe-theme-highlight-buffer-id t)

    ;; Resize titles (optional).
    (setq moe-theme-resize-title-markdown '(1.5 1.4 1.3 1.2 1.0 1.0))
    (setq moe-theme-resize-title-org '(1.5 1.4 1.3 1.2 1.1 1.0 1.0 1.0 1.0))
    (setq moe-theme-resize-title-rst '(1.5 1.4 1.3 1.2 1.1 1.0))

    ;; Choose a color for modeline.(Default: blue)
    (setq moe-theme-modeline-color 'cyan)

    ;; Finally, apply moe-theme now.
    ;; Choose what you like, (moe-light) or (moe-dark)
    (moe-light)

+END_SRC

If you have any question about settings, go on and read following README to get more detailed information first.

+BEGIN_QUOTE

**** Note

Notice that the file =moe-theme.el= is NOT a theme file, but it provide the ability for customization =moe-dark-theme= & =moe-light-theme=.

So, if you just want to use =load-theme= to apply ONLY =moe-theme= itself and without customizations, you can skip "Customizations" chapter and just use this:

+BEGIN_SRC lisp

     (add-to-list 'custom-theme-load-path "~/.emacs.d/PATH/TO/moe-theme/")

     (load-theme 'moe-dark t)
     ;;or
     (load-theme 'moe-light t)

+END_SRC

+END_QUOTE

*** Resize Titles You may want to resize titles in =markdown-mode=, =org-mode=, or =ReStructuredText-mode=:

+BEGIN_SRC lisp

  ;; Resize titles
  (setq moe-theme-resize-title-markdown '(2.0 1.7 1.5 1.3 1.0 1.0))
  (setq moe-theme-resize-title-org '(2.2 1.8 1.6 1.4 1.2 1.0 1.0 1.0 1.0))
  (setq moe-theme-resize-title-rst '(2.0 1.7 1.5 1.3 1.1 1.0))

+END_SRC

+BEGIN_QUOTE

Markdown should have 6 items; org has 9 items; rst has 6 items.

Make sure that these resizing settings should be placed before =(moe-dark)= or =(moe-light)=.

+END_QUOTE

The values should be lists. Larger the values, larger the fonts. If you don't like this, just leave them nil, and all the titles will be the same size.

*** Change Color of Mode-line (or Powerline)

+BEGIN_SRC lisp

(setq moe-theme-modeline-color 'orange) ;; (Available colors: blue, orange, green ,magenta, yellow, purple, red, cyan, w/b.)

+END_SRC

You can also use =M-x= =moe-theme-modeline-select-color= to change color interactively.

Or =M-x= =moe-theme-modeline-random-color= to have a good luck.

**** Powerline support

Now =moe-theme= supports [[https://github.com/milkypostman/powerline][Powerline]]. Run =powerline-moe-theme= if =powerline= installed.

+BEGIN_SRC lisp

(powerline-moe-theme)

+END_SRC

** Frenquently Asked Problems *** No 256-Color Output?

If your terminal emulator doesn't render 256-color output correctly, set its environment variable =TERM= to =xterm-256color=. For example:

*** Parenthesis Is Hard To Read?

I recommend set the value of =show-paren-style= to =expression= for better visual experience:

+BEGIN_SRC lisp

    (show-paren-mode t)
    (setq show-paren-style 'expression)

+END_SRC

** Known Issues

** License

=moe-theme.el= (include images) is released under GPL v3.