Oh-My-Zsh Setting (OSX, WSL)

황훈주·2020년 11월 13일
0
post-thumbnail

1. Oh My Zsh 설치

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

2. 폰트 받기 (Naver D2Coding 추천)

https://github.com/naver/d2codingfont

3. 폰트 적용 (D2Coding ligature, 13)

  • iTerm2
    Preference -> Profiles -> Text -> Font

  • Windows Terminal

    {
        "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
        "hidden": false,
        "name": "Ubuntu",
        "source": "Windows.Terminal.Wsl",
        "fontFace": "D2Coding Ligature",
        "fontSize": 12,
        "antialiasingMode": "cleartype",
        "colorScheme":"wsl",
        "padding": "15, 15, 15, 15",
        "closeOnExit": "graceful"                
    }

4. Color Theme 적용

  • iTemr2
    테마팩 댜운로드 : https://iterm2colorschemes.com
    iTerm2에 적용 (Preference -> Profiles -> Color -> Import .. 3024 Night.itermcolor

  • Window Terminal

    "schemes": [
        {
            "background" : "#002B36",
            "black" : "#002B36",
            "blue" : "#268BD2",
            "brightBlack" : "#657B83",
            "brightBlue" : "#839496",
            "brightCyan" : "#D33682",
            "brightGreen" : "#B58900",
            "brightPurple" : "#EEE8D5",
            "brightRed" : "#CB4B16",
            "brightWhite" : "#FDF6E3",
            "brightYellow" : "#586E75",
            "cyan" : "#2AA198",
            "foreground" : "#93A1A1",
            "green" : "#859900",
            "name" : "wsl",
            "purple" : "#6C71C4",
            "red" : "#DC322F",
            "white" : "#93A1A1",
            "yellow" : "#B58900"
        }
    ],

5. ZSH Plugin 설치

  • syntax-hightlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • auto suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

6. ZSH Theme 적용

$ code .zshrc
ZSH_THEME="agnoster"

# osx는 osx의 경우만 
plugins=(git osx zsh-syntax-highlighting zsh-autosuggestions)

7. PS 이름 바꾸기

cd ~/.oh-my-zsh/themes
code agnoster.zsh-theme
prompt_context() {
  if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
#   prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
    prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
  fi
}
profile
끄적끄적

0개의 댓글