Personal collection of .dotfiles for system configuration and customization.
To get started, clone this repository into your home directory:
git clone [repository_url] $HOME/.dotfilesAfter cloning the repository, navigate to the project directory to execute subsequent commands:
cd $HOME/.dotfilesThis pre-hook helps prevent accidental commits of sensitive information, such as passwords or API keys. Follow these steps to set up pre-commit for your repository.
# Install poetry
$ pip install poetry
# Enable and install pre-commit
$ poetry install
$ poetry run pre-commit install- Ensure that your repository includes a
pyproject.tomlfile with pre-commit listed as a development dependency. - If you have existing Git hooks, pre-commit will run in migration mode by default. Use the -f option to overwrite existing hooks and use only pre-commit.
If needed, back up the original configuration files before making changes.
Run the following commands to create symbolic links for the configuration files:
$ VSCODE_SETTING_DIR="$HOME/Library/Application Support/Code/User"
# Link settings.json
$ rm "$VSCODE_SETTING_DIR/settings.json"
$ ln -s "$(realpath vscode/settings.jsonc)" "$VSCODE_SETTING_DIR/settings.json"
# Link keybindings.json
$ rm "$VSCODE_SETTING_DIR/keybindings.json"
$ ln -s "$(realpath vscode/keybindings.jsonc)" "$VSCODE_SETTING_DIR/keybindings.json"To set up Bun’s global environment managed via this repository, run the following command:
sh scripts/install-bun.shThis script will: 1. Create a symbolic link between the Bun global directory and the repository’s managed directory. 2. Navigate to the Bun global directory. 3. Install dependencies listed in package.json.
After running the script, your Bun global environment will be fully configured and ready to use.
This section describes how to manage Homebrew packages using the Brewfile included in this repository. It allows you to easily set up and maintain a consistent Homebrew environment across machines.
To install the Homebrew packages listed in the Brewfile, navigate to the repository directory and run the following command:
cd $HOME/.dotfiles
brew bundle --file=homebrew/BrewfileThis will install all the packages specified in the homebrew/Brewfile.
To back up the currently installed Homebrew packages into the Brewfile:
-
Navigate to the repository directory:
cd $HOME/.dotfiles
-
Run the following command:
brew bundle dump --file=homebrew/Brewfile --force
This will overwrite the existing Brewfile with the current list of installed packages.
Here are some helpful commands:
// Show explicitly installed packages (leaves):
$ brew leaves
// Clean up unused dependencies:
brew autoremove
// Delete cached software files:
$ brew cleanup
// Show dependencies of a specific package:
$ brew deps [package_name]
// Show packages that depend on a specific package:
$ brew uses [package_name]