Hi yoahn 개발블로그

[iTerm] iTerm / oh-my-zsh 터미널 설정 본문

IT

[iTerm] iTerm / oh-my-zsh 터미널 설정

hi._.0seon 2021. 1. 26. 17:16
반응형

$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

oh-my-zsh 설치

 

vi ~/.oh-my-zsh/themes/agnoster.zsh-theme

# 이 부분 추가
prompt_newline() {
	if [[ -n $CURRENT_BG ]]; then
		echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%{%k%F{blue}%}$SEGMENT_SEPARATOR"
	else
		echo -n "%{%k%}"
	fi

	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
}

 

vi .zshrc

ZSH_THEME="agnoster" | "cloud"

 

iterm2colorschemes.com

 

Iterm Themes - Color Schemes and Themes for Iterm2

iTerm Themes Intro This is a set of color themes for iTerm (aka iTerm2). Screenshots below and in the screenshots directory. Installation Instructions To install: Launch iTerm 2. Get the latest version at iterm2.com Type CMD+i Navigate to Colors tab Click

iterm2colorschemes.com

- 위 사이트에서 마음에 드는 테마를 찾아 테마 이름 우클릭

- 파일 다운로드

- 확장자 .txt 제거

- iTerm > Preferences > Profile > Color > import > 다운받은 파일

 

medium.com/harrythegreat/oh-my-zsh-iterm2로-터미널을-더-강력하게-a105f2c01bec

 

Oh My ZSH+ iTerm2로 터미널을 더 강력하게

ZSH란?

medium.com

 

https://ooeunz.tistory.com/21

위 글을 보고 따라하면 터미널에 귀여운 이모지를 넣을 수 있다.

 

.zshrc

/*
** ~/.zshrc 
*/

ZSH_THEME="agnoster"

prompt_context() {
    emojis=("🚀 " "🍆")
    RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
    if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
        prompt_segment black default "${emojis[1]} %(!.%{%F{yellow}%}.)$USER"
    fi
}

D2Coding 폰트를 설치하면 글자 깨지는 문제를 해결할 수 있고, 

 

iTerm2 > preferences > Profiles > Text 탭에서

Unicode > Unicode normalization form :  -> NFC를 선택하면 한글 깨짐 문제가 해결된다.

Font > 에서 폰트 변경

반응형

'IT' 카테고리의 다른 글

노트북 추천  (0) 2020.01.16
Comments