Reputation: 2837
I have a nice and beautiful setup on iTerm2 (I'm using a Mac) where the default shell is ZSH and it is properly customized using Oh-my-zsh and the Agnoster-fcamblor Theme.
As a Spacemacs user, I would like to do as much as possible without leaving Emacs. So I decided to invoke a terminal window from inside of it, as I'm used to doing with Vim/tmux.
This is the look that I get (in the same directory):
Apparently the Theme is not being applied.
This is the relevant part of my ~/.spacemacs
:
(shell :variables
shell-default-shell 'ansi-term
shell-default-height 30
shell-default-term-shell "/bin/zsh"
shell-default-position 'bottom)
A few important things:
$> echo $0
shows me ZSH is the shell being used inside Spacemacs.$> echo $PS1
shows me it is properly set and it matches iTerm2.How can I apply the Oh-my-zsh Theme inside a Spacemacs Shell Window?
Upvotes: 9
Views: 3982
Reputation: 2837
Instead of trying to make Spacemacs options override the terminal options (wasn't able to do it), I decided to match the Spacemacs Theme with the Agnoster-Fcamblor theme I've been using, this way both have the same colors and backgrounds (a.k.a. skin/theme).
1. Inside dotspacemacs-additional-packages:
color-theme-solarized
2. Inside dotspacemacs/user-config:
(defun dotspacemacs/user-config ()
;; Fix separators
(setq ns-use-srgb-colorspace nil)
;; (setq powerline-default-separator 'utf-8)
;; Theme Customizations
(setq theming-modifications
'((solarized
;; Provide a sort of "on-off" modeline whereby the current buffer has a nice
;; bright blue background, and all the others are in cream.
;; TODO: Change to use variables here. However, got error:
;; (Spacemacs) Error in dotspacemacs/user-config: Wrong type argument: stringp, pd-blue
(mode-line :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active1 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active2 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(mode-line-inactive :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive1 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive2 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
;; Make a really prominent helm selection line.
(helm-selection :foreground "white" :background "#2075c7" :inverse-video nil)
;; See comment above about dotspacemacs-colorize-cursor-according-to-state.
(cursor :background "#b58900")
)))
Upvotes: 3