apt install zsh
curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh install.sh
vi ~/.zshrc
ZSH_THEME="agnoster"
기본 테마 설정을 agnoster로 바꾼다.
$ vi ~/.zshrc
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
위와 같이 바뀐다.
mkdir agnoster_theme
cd agnoster_theme
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts
폰트 깨짐 해결
brew 패키지 설치
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
$ echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.bash_profile
$ eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
$ cd ~/.oh-my-zsh/plugins
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
// add line in ~/.zshrc
$ vi ~/.zshrc
$ echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
$ vi ~/.zshrc
plugins=(git zsh-syntax-highlighting)
//apply change
$ source ~/.zshrc
$ vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
prompt_newline() {
if [[ -n $CURRENT_BG ]]; then
echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%(?.%F{$CURRENT_BG}.%F{red})❯%f"
else
echo -n "%{%k%}"
fi
echo -n "%{%f%}"
CURRENT_BG=''
}
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_aws
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_newline
prompt_end
}
$ cd ~/.oh-my-zsh/plugins
$ git clone https://github.com/zsh-users/zsh-autosuggestions.git
$ echo "source ${(q-)PWD}/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
$ vi ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
$ source ~/.zshrc
적용 후:
이미지 마크다운(Gitlab, Github 사용) (0) | 2020.12.23 |
---|---|
[구글 애드센스] 구글 애드센스 심사에 통과되다 (0) | 2020.12.23 |
NBO와 HBO (0) | 2020.07.13 |
Ubuntu 18.04 LTS 환경설정(pwntools, pwndbg, one gadget, vim, vmware tools) (1) | 2020.06.10 |
Ubuntu 18.04 LTS bridge 네트워크 설정 (0) | 2020.06.09 |