19

It's possible to install a new theme in spacemacs? How should I do this? I'm trying to install some theme from http://themegallery.robdor.com/

Mateus Vahl
  • 541
  • 1
  • 4
  • 8

3 Answers3

24
  1. Select your theme: http://themegallery.robdor.com/

  2. Go to your dotfile: SPC f e d

  3. Adding or edit the follow line adding our theme name(gruvbox in this example), make sure that is the first element of the list:

    (defun dotspacemacs/init ()
      (setq-default
        ;; ... other configurations...
        dotspacemacs-themes '(gruvbox))
    
  4. Reload your spacemacs: SPC q R

Stefan
  • 26,154
  • 3
  • 46
  • 84
Mateus Vahl
  • 541
  • 1
  • 4
  • 8
  • 2
    A hint, `SPC` or `Space` would not work unless you have chosen your permanent editing style as `Vim` in lieu of `Emacs`; then to solve the issue, for emacs user's, just use `M-m` (ie `Alt-m`). – Esmaeil MIRZAEE Oct 30 '19 at 08:00
  • `SPC f e R` worked for me to reload the configuration. But full restart was needed to actually apply a new theme. – ilyazub Apr 21 '21 at 14:25
11

You need to first add themes mega-pack to your .spacemacs

  • start emacs
  • edit conf Spacefed
  • udpate dotspacemacs-configuration-layer adding themes-megapack
  • resync conf SpacefeR
  • update dotspacemacs/user-initadding dotspacemacs-themes '(jbeans))) , replacing jbeans with your theme of choice
  • restart conf SpaceqR
  • 1
    Theme mega-pack broke my installation pretty hard. I'm running emacs 26.1 on Pop OS (Ubuntu derivative). All dark themes were permanently horked, and I had to delete .emacs.d and .spacemacs and start over. – Reb.Cabin Sep 06 '18 at 14:34
  • I setup spacemacs this week and I'm able to just put the name of any theme from http://themegallery.robdor.com/ into the dotspacemacs-themes and when I restart spacemacs it provisions the theme for me (i.e. installs all package dependencies). I've not had to add/enable the themes mega-pack explicitly anywhere. – Sankalp Feb 25 '19 at 09:54
4

Installation and configuration.

  1. Open the configuration dotfile, ~/.spacemacs , M-m f e d.
  2. "Install" themes (two options).
    • Add the mega-pack layer at the layer section; or
      dotspacemacs-configuration-layers
      '(
        ...
        mega-pack
        ...
        )
      
    • Add a particular theme package at the package section.
      dotspacemacs-additional-packages '(...
                                         ...
                                         sometheme-theme)
      
  3. Set the themes to be loaded a the theme section.
    dotspacemacs-themes '(sometheme-somevariant
                          sometheme-othervariant)
    
  4. Resync configuration so themes are effectively installed, M-m f e R. Or restart, M-m q R.
  5. Cycle themes by pressing M-m T n.

Notes.

  • The mega-pack itself lists dozens of themes. If it is a personal (one user) setup, I recommend to simply install the specific theme packages that you are going to use.
  • Each theme package may include several variants, like solarized-theme which includes solarized-dark and solarized-light.
  • Two/three theme variants are enough.
vitaminace33
  • 206
  • 1
  • 6