Skip to content

danielnmai/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up coding environment

Personal config files tracked with a bare git repo. Setup approach from: https://www.atlassian.com/git/tutorials/dotfiles

Configs tracked

  • zsh.zshrc, .zprofile
  • tmux.tmux.conf, .tmux/plugins/ (tpm, tmux-sensible, tmux-powerline)
  • neovim.config/nvim/
  • karabiner.config/karabiner/karabiner.json
  • starship.config/starship.toml
  • kitty.config/kitty/kitty.conf
  • tmux-powerline.config/tmux-powerline/
  • rectangleRectangleConfig.json

New machine setup

1. Download essential apps (macOS)

2. Install Homebrew (macOS)

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

3. Set up GitHub SSH key

Generate a new SSH key and add it to your GitHub account:

ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

Copy the public key and add it at https://github.com/settings/keys:

pbcopy < ~/.ssh/id_ed25519.pub

4. Install Oh My Zsh

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

5. Clone the bare repo

git clone --bare git@github.com:danielnmai/dotfiles.git ~/.cfg

6. Set up the config alias

alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'

Add this to your .zshrc so it persists.

7. Check out dotfiles

config checkout

If there are conflicts with existing files, back them up first:

mkdir -p ~/.config-backup && \
config checkout 2>&1 | grep "\s\+\." | awk '{print $1}' | xargs -I{} mv {} ~/.config-backup/{}
config checkout

8. Hide untracked files in status

config config --local status.showUntrackedFiles no

9. Install dependencies

Core tools

Debian/Ubuntu:

sudo apt install git zsh tmux neovim curl build-essential
chsh -s $(which zsh)

macOS (Homebrew):

brew install zsh tmux neovim curl

git is included with Xcode Command Line Tools (xcode-select --install).

Oh My Zsh custom plugins

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/jeffreytse/zsh-vi-mode ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-vi-mode

Starship prompt

curl -sS https://starship.rs/install.sh | sh

fzf

Debian/Ubuntu:

sudo apt install fzf

macOS:

brew install fzf

nvm (optional)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

10. Set up secrets

Create ~/.secrets (not tracked) with any tokens or keys:

touch ~/.secrets
chmod 600 ~/.secrets

Add secrets as exports, e.g.:

export NPM_TOKEN_GITHUB="..."

11. Install tmux plugins

First, install tpm (Tmux Plugin Manager):

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

Then start tmux and reload the config:

tmux
tmux source ~/.tmux.conf

Then press prefix + I (Ctrl-b, then Shift+I) to install plugins.

12. Set up LazyVim

LazyVim requires some external tools:

Debian/Ubuntu:

sudo apt install ripgrep fd-find

Note: on Debian/Ubuntu the binary is fdfind instead of fd. Create a symlink if needed: ln -s $(which fdfind) ~/.local/bin/fd

macOS:

brew install ripgrep fd

Then open nvim — LazyVim will automatically install its plugins on first launch.

13. Import Rectangle config (macOS only)

Install Rectangle, then use Preferences → Import to load ~/RectangleConfig.json.

About

Personal configs for everything related to coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors