MacOS配置 iTerm2,oh-my-zsh,zsh_028

MacOS配置 iTerm2,oh-my-zsh,'zsh'

zsh

Mac 自带的 zsh终端

cat /etc/shells

修改系统默认的终端为zsh

# 更改终端
chsh -s /bin/zsh

# 确认是否更改成功
echo $SHELL
# /bin/zsh

安装oh-my-zsh

https://github.com/robbyrusse...

安装

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装主题和字体

链接 https://github.com/Powerlevel...

因为安装了 oh-my-zsh,就用下面的方式安装即可

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

编辑.zshc

vi .zshrc
# 更改
ZSH_THEME="powerlevel9k/powerlevel9k"

下载字体

直接找到字体文件下载下来 安装

https://github.com/gabrielela...

安装好即可

更改字体

这时候打开终端字体是乱码的 需要配置一下字体

下载主题

https://iterm2colorschemes.com/
https://github.com/mbadolato/...

主题设置,字体设置

安装 iTerm2

https://www.iterm2.com/downlo...

主题设置,字体配置

更改.zshc设置

https://github.com/Powerlevel...

进一步配置参考

注意

iTerm图标无法显示问题

这边字体配置要放在主题前面

# 字体设置房放在主题设置前面
POWERLEVEL9K_MODE='awesome-patched'

ZSH_THEME="powerlevel9k/powerlevel9k"

VSCode 配置

  "terminal.external.osxExec": "iTerm.app",
  "terminal.integrated.shell.osx": "zsh",
  "terminal.integrated.fontFamily": "Droid Sans Mono Awesome",

我的配置


POWERLEVEL9K_MODE='awesome-patched'

ZSH_THEME="powerlevel9k/powerlevel9k"

plugins=(
   git
   extract
   z
 )

source $ZSH/oh-my-zsh.sh

source ~/.bash_profile

POWERLEVEL9K_HOME_ICON=''
POWERLEVEL9K_HOME_SUB_ICON=''
POWERLEVEL9K_FOLDER_ICON=''

DISABLE_AUTO_TITLE="true"

POWERLEVEL9K_VCS_GIT_ICON=''
POWERLEVEL9K_VCS_STAGED_ICON='\u00b1'
POWERLEVEL9K_VCS_UNTRACKED_ICON='\u25CF'
POWERLEVEL9K_VCS_UNSTAGED_ICON='\u00b1'
POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON='\u2193'
POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON='\u2191'

POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='green'
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow'
#POWERLEVEL9K_VCS_UNTRACKED_ICON='?'

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status os_icon context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs virtualenv rbenv rvm time)

POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4

POWERLEVEL9K_TIME_FORMAT="%D{%H:%M \uE868  %d.%m.%y}"

POWERLEVEL9K_STATUS_VERBOSE=false
export DEFAULT_USER="$USER"

你可能感兴趣的:(iterm2,macos,javascript,终端)