상세 컨텐츠

본문 제목

[iTerm2] oh-my-zsh, powerlevel10k 로 mac 터미널 커스텀하기

일기

by 기먕로기 2023. 3. 30. 00:00

본문

결과

cool

위 사진 같은 가독성 좋고, 사용하면서 즐거운 터미널을 만들어 보겠습니다.


iTerm2 설치

https://iterm2.com/

 

iTerm2 - macOS Terminal Replacement

iTerm2 by George Nachman. Website by Matthew Freeman, George Nachman, and James A. Rosen. Website updated and optimized by HexBrain

iterm2.com

위 링크에서 설치를 진행한다.


oh-my-zsh 설치

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

여러 테마와 플러그인을 사용할 수 있게 해준다.


powerlevel10k 설치 및 적용

git clone https://github.com/romkatv/powerlevel10k.git $ZSH/themes/powerlevel10k

위 커멘드로 powerlevel10k 테마를 설치한다.

vi ~/.zshrc

vi나 nano 같은 텍스트 에디터로 ~/.zshrc 파일을 수정할 것 이다.

ZSH_THEME="powerlevel10k/powerlevel10k"

.zshrc 파일의 ZSH_THEME 이라는 항목을 위 처럼 수정한다.

source ~/.zshrc

터미널에 위 명령어를 입력 하면 테마 초기설정 단계가 시작되고, 폰트를 설치하고, 터미널을 재시작 한 뒤 본격적인 테마 설정이 시작된다.

 

이후 재설정은 아래 커맨드를 입력하면 된다.

p10k configure

iTerm2 색상 바꾸기

색 조합 설치

curl을 이용할 것으로 curl을 설치한다.

brew install curl

https://iterm2colorschemes.com/

 

Iterm Themes - Color Schemes and Themes for Iterm2

 

iterm2colorschemes.com

이 곳에서 원하는 색 조합을 결정한다.

 

원하는 조합의 이름을 클릭하면 xml이 보여질텐데 이 xml의 URL을 복사한다.

 

복사한 URL을 이용하여 아래 명령어를 본인이 기억할 수 있는 위치에서 입력한다.

# 본인이 기억할 수 있는 위치
mkdir iTerm2-color && cd iTerm2-color

# 색 조합 설치
curl -LO "복사한 색 조합 URL"
# example
curl -LO https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Dracula%2B.itermcolors

색 조합 적용

cmd + comma(,) 조합으로 settings에 들어가 Profiles > Colors에 들어가 Color Presets를 클릭한다.

Profiles > Colors

Import를 누른다.

click Import

finder에서 아까 색 조합을 설치한 폴더에 접근하여 색 조합 선택 후 Open을 누른다.

finder

Dracula 테마가 Color Presets에 추가된 것을 볼 수 있고, 적용이 가능하다.

Dracula 색조합이 추가되었다.


커스텀 완료

complete

위와 같은 예뻐진 터미널을 만날 수 있다!

관련글 더보기

댓글 영역