MacOS configuration iTerm2,oh-my-zsh,zsh_028

Keywords: Javascript github git shell Mac

MacOS configuration iTerm2,oh-my-zsh,'zsh'

zsh

Mac Self contained zshterminal

cat /etc/shells

Modify the default terminal of the system to zsh

# Change terminal
chsh -s /bin/zsh

# Verify that the change was successful
echo $SHELL
# /bin/zsh

Install oh-my-zsh

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

install

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

Install theme and font

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

Because oh-my-zsh is installed, you can install it in the following way

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

Edit.zshc

vi .zshrc
# change
ZSH_THEME="powerlevel9k/powerlevel9k"

Download font

Find the font file directly, download it and install it.

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

Installation is enough.

Change font

At this point, opening the terminal font is scrambled. You need to configure the font.

Download theme

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

Theme Settings, Font Settings

Install iTerm2

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

Theme Settings, Font Configuration

Change. zshc settings

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

Further configuration reference

Be careful

iTerm icon cannot display problem

This font configuration should be placed in front of the theme

# Font Settings Room in front of Theme Settings
POWERLEVEL9K_MODE='awesome-patched'

ZSH_THEME="powerlevel9k/powerlevel9k"

VSCode configuration

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

My configuration


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"

Posted by 0p3n_p0rT on Mon, 30 Sep 2019 07:45:15 -0700