How to configure Oh My ZSH in Spacemacs shell?

Context

I have a beautiful and beautiful setup on iTerm2 (I use a Mac), where the default shell is ZSH , and it is correctly configured using Oh -my-zsh and the Agnoster-fcamblor theme .

enter image description here


Question

As a user of Spacemacs, I would like to do as much as possible without leaving Emacs. Therefore, I decided to call the terminal window from the inside, as I'm used to doing with Vim / tmux.

This is the look I get (in the same directory):

enter image description here


Things I checked

Apparently, the topic does not apply.

This is an important 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 , the shell used inside Spacemacs.
  • $> echo $PS1 shows that it is correctly installed and corresponds to iTerm2.
  • I tried to find the configuration file that I am using, but as the above fact shows, it is already loading.

Question

How to apply Oh-my-zsh theme in Spacemacs shell window?

+5
source share
1 answer

Instead of making the Spacemacs options override the terminal settings (failed to do this), I decided to map the Spacemacs theme to the Agnoster-Fcamblor theme that I used, so both have the same colors and backgrounds (they are called skin / theme).

1. Inside dotspacemacs-add-on 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") ))) 
+2
source

Source: https://habr.com/ru/post/1271028/


All Articles