Skip to content

Instantly share code, notes, and snippets.

@zzzz465
Last active July 3, 2022 11:56
Show Gist options
  • Save zzzz465/3eea712f38cb462bb03330975f04a295 to your computer and use it in GitHub Desktop.
Save zzzz465/3eea712f38cb462bb03330975f04a295 to your computer and use it in GitHub Desktop.
개인 zsh 셋업용 스크립트
#!/bin/bash
function zsh_append_plugin {
sed -i -E "s/^plugins=\(([a-zA-Z ]+)\)/plugins=(\1 $1)/g" .zshrc
}
# zsh 설치 및 기본값 설정
cd ~
sudo apt install -y zsh
chsh -s $(which zsh)
# oh my zsh 설치 및 실행
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# powerlevel10k 설치 및 세팅
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i -E 's|ZSH_THEME="[a-zA-Z]+"|ZSH_THEME="powerlevel10k/powerlevel10k"|g' .zshrc
# 옵션 세팅 (
zsh
# homebrew 세팅
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/madeline/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt install -y build-essential
brew install gcc
# 아래는 플러그인들
## zsh z
git clone https://github.com/agkozak/zsh-z ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-z
zsh_append_plugin "zsh-z"
## fish like autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
zsh_append_plugin "zsh-autosuggestions"
## zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
zsh_append_plugin "zsh-syntax-highlighting"
# 유틸 툴들
sudo apt update
sudo apt install -y bat fd-find software-properties-common nodejs
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt install -y python3.9 python3.9-distutils
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
curl -fsSL https://deno.land/x/install/install.sh | sh
export DENO_INSTALL="/$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
brew install fzf
# To install useful key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install
# kubectl
brew install kubectl
kubectl version --client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment