Skip to content

m-allanson/dotfiles

Repository files navigation

dotfiles

My dotfiles for macOS, managed via chezmoi.

Requirements

  • homebrew
  • chezmoi (brew install chezmoi)

Getting started

The init command will create a copy of this repo at a default location:

chezmoi init github.com/m-allanson/dotfiles --ssh

Note: Run chezmoi cd to switch to the repo directory.

See what changes chezmoi will apply to your system:

chezmoi diff

Apply the changes:

chezmoi apply

Restart your shell to see any changes applied.

Other chezmoi commands

See the command overview for more details.

  • chezmoi cd to switch to the chezmoi directory

  • chezmoi add <filepath> to sync a file's state from the target dir back to chezmoi's source dir.

Addons

Review the .zshrc file for any expected addons.


Personal settings

On first run, the following (empty) files will be added to your $HOME directory. They won't be version controlled, or managed by chezmoi, but will be sourced as part of the environment setup.

  • A .personal file for any non-public zsh settings.

  • A .gitconfig.personal file for any non-public git settings. For example:

[user]
	name = Foo Bar
	email = [email protected]
[github]
	user = -username
	token = atokengoeshere

Other dependencies

These dotfiles have some dependencies. You will need to ensure homebrew is available before using this repo. After that, the run_once_ scripts should handle the remaining dependencies.

Benchmarking

You can run the following command to test startup time:

for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
View my current numbers

2024 numbers:

Apple M3 Pro Macbook Pro (2023)

❯ for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
        0.05 real         0.02 user         0.02 sys
        0.03 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys
        0.02 real         0.01 user         0.01 sys

2022 numbers:

2.3 Ghz 8-Core Intel Core i9 Macbook Pro (2019)

❯ for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
        0.07 real         0.04 user         0.02 sys
        0.05 real         0.03 user         0.02 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys
        0.05 real         0.03 user         0.01 sys

Old numbers:

❯ for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
        0.18 real         0.08 user         0.10 sys
        0.17 real         0.07 user         0.09 sys
        0.18 real         0.07 user         0.10 sys
        0.19 real         0.08 user         0.11 sys
        0.19 real         0.08 user         0.10 sys
        0.18 real         0.08 user         0.10 sys
        0.17 real         0.07 user         0.09 sys
        0.18 real         0.07 user         0.09 sys
        0.18 real         0.08 user         0.10 sys
        0.19 real         0.08 user         0.10 sys

Resources

Inspired by (and often copied from) from various places, such as:

TODO

About

My dotfiles for macOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published