Skip to content

ivnvxd/dotfiles

Repository files navigation

dotfiles

0. Install Command Line Tools

xcode-select --install

1. Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Setup Git

Install git:

brew install git

Add git credentials:

git config --global user.name "Andrey Ivanov"
git config --global user.email "[email protected]"

Generate ssh keys:

# Generate new ssh key
ssh-keygen -t ed25519  -C "[email protected]"

# Start the ssh-agent in the background
eval "$(ssh-agent -s)"

# Add your SSH private key to the ssh-agent
ssh-add ~/.ssh/id_ed25519

Add ssh-key to GitHub account:

# Copy ssh key to clipboard
cat ~/.ssh/id_ed25519.pub

Add gloabl gitignore:

git config --global core.excludesfile ~/.gitignore_global

3. Copy dotfiles

from https://github.com/ivnvxd/dotfiles

git clone [email protected]:ivnvxd/dotfiles.git ~

4. Install everything from  ~/Brewfile

brew bundle install

To create a Brewfile:

brew bundle dump

5. Setup zsh shell

Install oh-my-zsh:

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

(optional) Install Powerlevel10k:

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

# configure Pure theme:
p10k configure

Install plugins:

git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

5.1 Setup fish shell

Add fish to the shell list:

sudo bash -c 'echo $(which fish) >> /etc/shells'

(optional) make fish the default shell:

chsh -s $(which fish)

(optional) Uncomment in .config/tmux/tmux.conf:

set-option -g default-shell "/opt/homebrew/bin/fish"

Install fish pure theme:

fisher install rafaelrinaldi/pure

6. Setup tmux

Install Tmux Plugin Manager:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Install plugins with <prefix> I

7. Setup Vim

Install Plug

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

:PlugInstall to install plugins.

8. Setup Poetry

Either brew or:

curl -sSL https://install.python-poetry.org | python3 -

Configure Poetry to create vitual env inside each project

poetry config virtualenvs.in-project true

9. Restore settings

Syncalicious

from /Users/ve/Library/Mobile Documents/com~apple~CloudDocs/Syncalicious/macbook-air-andrey.local to ~/Library/Preferences

10. Add defaults

chflags nohidden ~/Library  # Show Library folder
defaults write com.apple.finder AppleShowAllFiles true  # Show hidden files
defaults write com.apple.finder ShowPathbar -bool true  # Show path bar
defaults write com.apple.finder ShowStatusBar -bool true  # Show status bar

Enable key-repeating:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false              # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false      # For VS Code Insider
defaults write com.vscodium ApplePressAndHoldEnabled -bool false                      # For VS Codium
defaults write com.microsoft.VSCodeExploration ApplePressAndHoldEnabled -bool false   # For VS Codium Exploration users
defaults delete -g ApplePressAndHoldEnabled                                           # If necessary, reset global default

Fix controller Home button:

defaults write com.apple.GameController bluetoothPrefsMenuLongPressAction -integer 0
defaults write com.apple.GameController bluetoothPrefsShareLongPressSystemGestureMode -integer -1

killall Dock

Add separator to Dock:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'; killall Dock

11. Setup Go

go install mvdan.cc/gofumpt@latest
go install -v github.com/incu6us/goimports-reviser/v3@latest
go install github.com/segmentio/golines@latest
go install github.com/go-delve/delve/cmd/dlv@latest

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

12. Setup VSCode

Install extensions:

./vscode-extension-install.sh

To create a list of installed extensions:

code --list-extensions > extensions.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published