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?
You can browse all the “Oh My ZSH” Themes here. To change the Theme, simply change the ZSH_THEME value in ~/. zshrc file from robbyrussell to Avit.
It is the most popular framework for managing Zsh configuration, plugins, and themes. It will help you transition from using your current shell to Zsh in the easiest way possible. Although Oh My Zsh can do many other things, it is the most famous for its ability to easily manage a ton of themes and plugins.
Go to the “Shell” tab and check “Run command:” and enter “zsh”
The Z shell (also known as zsh ) is a Unix shell that is built on top of bash (the default shell for macOS) with additional features. It's recommended to use zsh over bash . It's also highly recommended to install a framework with zsh as it makes dealing with configuration, plugins and themes a lot nicer.
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")
)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With