Search

oh my zsh 테마 국룰은 agnoster 이지

oh my zsh 설치 후 .zshrc 파일 열기

vi, vim, nano, 텍스트 에디터 어떤 에디터로 열던 상관없다고 함
vi .zsh vim .zsh nano .zsh
Shell
복사
.zshrc는 zsh의 설정파일로, 플러그인, 테마 등을 적용할 때 zshrc를 수정해서 적용함
# If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. export ZSH="$HOME/.oh-my-zsh" # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes ZSH_THEME="agnoster" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load # a theme from this variable instead of looking in $ZSH/themes/ # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" # Uncomment the following line to use hyphen-insensitive completion. # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" # Uncomment one of the following lines to change the auto-update behavior # zstyle ':omz:update' mode disabled # disable automatic updates # zstyle ':omz:update' mode auto # update automatically without asking # zstyle ':omz:update' mode reminder # just remind me to update when it's time
Plain Text
복사
처음 oh my zsh를 설치하면, ZSH_THEME="robbyrussell"로 설정되어있는데, agnoster로 변경하고 닫는다.

.zshrc 닫고 Terminal에서 .zshrc 변경사항 적용

source ~/.zshrc
Shell
복사

폰트 깨짐 - 폰트 설정

terminal 종료 후 다시 열면, ~ 와 같은 식으로 폰트가 깨져있는 모습을 확인 할 수 있음.
agnoster 의 설명에 따르면, patchted fonts from Vim-Powerline을 설치하라고 나와있음.
fonts
powerline
데비안 우분투 계열 리눅스는 1문단, 페도라, 레드햇 계열 리눅스는 2문단, 다른OS는 마지막 문단 참고
https://github.com/powerline/fonts.git 가장 최근 커밋 된거 깃 클론, ~/fonts 에서 홈 디렉토리에 있는 install.sh 실행
git clone https://github.com/powerline/fonts.git -- depth=1
Shell
복사
cd fonts ./install sh
Shell
복사
터미널 설정 - 프로파일 - Basic - 텍스트 - 서체변경(Powerline중 아무거나)
(기본 터미널 대신 Iterm2를 사용하고있다면, Iterm2에서도 따로 서체변경을 설정해줘야 적용됨)

agnoster 테마 커스터마이징

~/.oh-my-zsh/themes/agnoster.zsh-theme 파일 수정
예시) prompt_dir() 을 수정해서 directory 표시하는 부분의 색상이나 아이콘 등을 커스터마이징 할 수 있음
# Dir: current working directory prompt_dir() { prompt_segment blue $CURRENT_FG '%~' }
Plain Text
복사