These are my personal dotfiles for a fish
shell on an ARM-based Mac, including essential tools and opinionated
settings.
To configure fish
as your default shell, run the following commands:
brew install fish # Install fish via Homebrew
echo $(which fish) | sudo tee -a /etc/shells # Add fish to the list of system shells
chsh -s $(which fish) # Set fish as the default shell
fish # Start a new fish shell
eval "$(/opt/homebrew/bin/brew shellenv)" # Set up Homebrew in fish
fish_add_path (brew --prefix)/bin (brew --prefix)/sbin # Add Homebrew binaries to $PATH
First, clone the project in your home directory and cd
into it:
git clone https://github.com/mbd-s/dotfiles.git ~/dotfiles
cd ~/dotfiles
The setup script bootstraps a fresh installation of macOS. It will set sane defaults, symlink config files, and install a bunch of tools (iTerm2, Visual Studio Code, Go, Terraform, Starship, etc.) via Homebrew and asdf:
make setup
The command is nondestructive, so it won't overwrite existing files. Run make help
to see all available commands.
Private configuration can be stored in files with the .fish
extension in $DOTFILES/fish/.config/fish/private/
. If
you ran make setup
, everything in this directory will be symlinked to $__fish_config_dir/private/
but ignored by
git
. Example:
set -x CDPATH . ~ path/to/directory/you/want/in/CDPATH
alias secret "Something secret!"
Create a file at $DOTFILES/git/.gitlocal
with your own git
user details and any aliases or options you don't want to
check into version control. Example:
[user]
name = Your Name
email = your-git-commit-email-address@example.com
[alias]
mine = log --author='Your Name'
To split home and work concerns, you could nest all work-related repositories inside a work/
directory and configure a
git
user for your work projects at $DOTFILES/git/work/.gitlocal
. Example:
[user]
email = your-work-git-commit-email-address@example.com
I've split Homebrew packages similarly along home and work concerns. To install the home packages, create an empty
.home
file in the root of this project. To install the work packages, create an empty .work
file instead. (Both
files are ignored by git
.) The common packages are installed in any case.
- Open iTerm2
- Select
iTerm2 > Preferences
- Select
Profiles
- Select the
Other Actions...
dropdown menu and clickImport JSON profiles...
- Choose the profile you want to use from the ones in
$DOTFILES/iterm/
I find it's best to manage your VS Code settings with profiles and settings sync. The config here is just for reference.
To remove symlinked files:
make clean
If you notice something that doesn't work, please let me know by opening an issue!