This repository contains a script to set up your development environment by installing necessary packages and configuring dotfiles. The setup script handles the installation of Homebrew, various packages, and the configuration of several tools and applications.
- Homebrew Installation: Installs Homebrew if not already installed.
- Package Installation: Installs a list of useful packages for development.
- Configuration: Sets up configurations for Zsh, Yabai, skhd, Neovim, Kitty, and Git.
- Directory Setup: Creates necessary directories for your projects.
- Service Management: Starts and restarts services for skhd and yabai.
To get started, clone the repository and run the setup script:
git clone [email protected]:pgaijin66/dotfiles.git
cd dotfiles
bash bootstrap.sh
Sets up the configuration directory:
export CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME"/.config}
if [[ ! -d "$CONFIG_HOME" ]]; then
mkdir -p "$CONFIG_HOME"
fi
Checks if Homebrew is installed and installs it if not:
function install_brew {
if [[ ! $(command -v brew) ]]; then
echo "No brew installation found, installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update && brew upgrade
else
echo "brew is installed, nothing to do here..."
fi
}
Installs a list of useful packages:
function install_packages {
brew install bat gcc ripgre..
}
Installs and configures additional tools like skhd, Kitty, Terraform, Python, and Ansible:
function install_kitty {
/bin/bash -c "$(curl -fsSL https://sw.kovidgoyal.net/kitty/installer.sh)"
}
function install_terraform {
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
}
function install_python {
brew install [email protected]
curl -O https://bootstrap.pypa.io/get-pip.py
}
Sets up dotfiles for Zsh, Yabai, and skhd:
function setup_dotfiles {
DOTFILES="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ ! -d "$HOME/.oh-my-zsh" ]; then
KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
ln -sf "$DOTFILES"/zsh/zshrc "$HOME"/.zshrc
ln -sf "$DOTFILES"/yabai/yabairc "$HOME"/.yabairc
chmod +x ~/.yabairc
ln -sf "$DOTFILES"/skhd/skhdrc "$HOME"/.skhdrc
chmod +x ~/.skhdrc
}
Creates required directories:
function setup_directories {
mkdir -p ~/src/personal/{github,books,docs,experiments,personal,projects,work} \
~/src/work/{books,docs,experiments,personal,projects,work}
}
Sets up configuration files for Neovim, Kitty, and Git:
function setup_config_files {
rm -rf "$HOME"/.config/nvim
ln -s "$DOTFILES"/nvim "$HOME"/.config/nvim
rm -rf "$HOME"/.config/kitty
ln -s "$DOTFILES"/kitty "$HOME"/.config/kitty
ln -sf "$DOTFILES"/git/gitconfig "$HOME"/.gitconfig
}
Restarts services for skhd and yabai:
function start_services {
skhd --restart-service
yabai --restart-service
}