Skip to content

Commit

Permalink
feat: add scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseo0507 committed Dec 13, 2024
0 parents commit 77c9772
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/00_install_brew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
21 changes: 21 additions & 0 deletions scripts/01_setup_zsh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Install zsh plugins
brew install \
zsh-autosuggestions \
zsh-syntax-highlighting

# Install powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

sed -i "s/^ZSH_THEME=.*/ZSH_THEME=\"powerlevel10k/powerlevel10k\"/" "$ZSHRC_PATH"

# Copy zsh-scripts to ~/.zsh-scripts
cp -r zsh-scripts ~/.zsh-scripts

# Insert source commands into .zshrc
echo "source ~/.zsh-scripts/zsh-plugin.zsh" >> ~/.zshrc
echo "source ~/.zsh-scripts/zsh-alias.zsh" >> ~/.zshrc

source ~/.zshrc
27 changes: 27 additions & 0 deletions scripts/02_install_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
GENERAL=(google-chrome notion slack figma deepl raycast)
DEVELOPMENT=(iterm2 visual-studio-code cursor lazygit proxyman ngrok act)

# Install general packages
brew install --cask \
google-chrome \
notion \
slack \
figma \
deepl \
raycast \
lazydocker

# Install development packages
brew install --cask \
iterm2 \
cursor \
visual-studio-code \
lazygit \
proxyman \
ngrok \
act

# Install App Store packages (KakaoTalk, Magnet)
brew install mas
mas install 869223134 441258766

18 changes: 18 additions & 0 deletions scripts/03_setup_nodejs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Install nvm
brew install nvm

mkdir -p ~/.nvm

echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion' >> ~/.zshrc

# Install Node.js
nvm install lts/jod
nvm use lts/jod
nvm default lts/jod

# Install package manager
brew install corepack
corepack enable pnpm

30 changes: 30 additions & 0 deletions zsh-scripts/zsh-alias.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Lazygit shortcut
alias lz='lazygit'
alias ld='lazydocker'

# Git CLI shortcuts
alias g='git'
alias ga='git add'
alias gaa='git add --all'

alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
alias gbD='git branch -D'
alias gbl='git blame -b -w'
alias gbnm='git branch --no-merged'
alias gbr='git branch --remote'

alias gcm='git commit -m'
alias gca="git commit --amend"
alias gcan="git commit --amend --no-verify"

alias gco='git checkout'
alias gcb='git checkout -b'

alias gf='git fetch'
alias gfa='git fetch --all --prune'
alias gfo='git fetch origin'
alias gl='git pull'
alias gp='git push'
alias gpr='git pull --rebase'
2 changes: 2 additions & 0 deletions zsh-scripts/zsh-plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

0 comments on commit 77c9772

Please sign in to comment.