Scripts (zsh && Homebrew) to set up and keep a machine up-to-date (macos).
β² date && for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
Mon Apr 24 23:59:05 EDT 2023
0.06 real 0.03 user 0.02 sys
0.06 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.03 sys
0.05 real 0.03 user 0.03 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sysπ₯οΈ Fresh install?
ποΈ Note: Youβll need to set the version.
VERSION=3.0.41
REPOSITORY=dotfiles
curl -LJ -k https://github.com/JeromeFitz/$REPOSITORY/archive/v$VERSION.tar.gz -o $REPOSITORY@$VERSION.tar.gz
mkdir -p ~/.$REPOSITORY
tar -xf $REPOSITORY@$VERSION.tar.gz -C ~/.$REPOSITORY
Git installed?
ποΈ Note: No need to set version. Though once you have your SSH Key setup you will want to swap the git remote to [email protected]:JeromeFitz/dotfiles.git
git clone https://github.com/JeromeFitz/dotfiles.git ~/.dotfilescd ~/.dotfiles
# Brewfile
sh ./scripts/bootstrap
# # # OR # # #
# Brewfile-Slim
sh ./scripts/bootstrap -sThis will go through:
-
git config - ποΈ symlinks
- πΊοΈ homebrew install (+ post installs)
- ποΈ
Brewfile|Brewfile-Slim
- ποΈ
- π οΈ zsh configuration
- π€οΈ zsh functions
π NOTE:
nodesometimes gets installed immediately, other times you may need to run this twice.
Prompt for git: username|authorname|authoremail
Sets up gitconfig.private.symlink which is included w/in gitconfig.symlink and not attributed to repo. ποΈ
If you have multiple git accounts and need to differentiate between, oh let's say, GitHub and GitLab for example, you will need to do some custom modifications to the newly created gitconfig.private.symlink:
...
# Default
[includeIf "gitdir:~/"]
path = .gitconfig.private.default
# Custom
[includeIf "gitdir:~/Code/@custom/"]
path = .gitconfig.private.customWhere they are set up with the following respectively (or, you know, further customized). The main swap (aside from any GitHub|GitLab customizations) are the format of the name and email to associate with the commits:
./symlinks/gitconfig.private.default.symlink
[github]
user = JeromeFitz
[user]
name = Jerome Fitzgerald
email = [email protected]
./symlinks/gitconfig.private.custom.symlink
[gitlab]
user = CustomHandle
[user]
name = Last, First
email = [email protected]You will the need to run the symlinks again.
To check which name|email you are currently using you can run getGitConfig:
β² .dotfiles [main] getGitConfig
[ git ] π user.name: Jerome Fitzgerald
[ git ] π§ user.email: [email protected]Will set up ~/.[xyz] with:
ββββ symlinks
β β hyper.js.symlink
β β zshrc.symylink
β β *.symlinkPeep the Brewfile|Brewfile-Slim in root to see what all will be installed.
Afterward, this will run every install located in:
ββββ config
β β *.install.shbrew bundle cleanupWill show any installation from Homebrew not in Brewfile.
brew bundle cleanup -fWill uninstall those extra brew|cask|tap|....
ββββ config
β β sandboxd.plugin.zsh
β β *.path.zsh
β β *.!completion.zsh
β β *.completion.zshCreated/Maintained via ./scripts/zsh-config-setup. That will cycle through the above (path|*|completion) to generate a hard-code list to source from that is pulled in via zshrc.symlink.
By not typesetβing and looping through on zsh init dynamically we save ~0.56s. π
οΈ
These files rarely change, so we can side-step the init hit.
The following can be run to keep up-to-date on any changes you make:
zsh-config-setupAnd will also update via the boostrap and dot commands. π―οΈ
ποΈ Note: If we ran this dynamically first, and cached for subsequent sessions that could be a down the line trade-off for proper dynamic sourcing.
Utilizes sandboxd for:
nvmpyenvruby
ποΈ Note: On new boxes you will need to install node|python|ruby accordingly.
dotis a simple script that installs some dependencies, sets sane macOS defaults, and so on. Tweak this script, and occasionally rundotfrom time to time to keep your environment fresh and up-to-date. You can find this script inbin/.ref: @holman/dotfiles
dot -s will run from Brewfile-Slim which is a reduced Brewfile.
Over the years I have revamped this a bit through inspiration and sheer π½οΈ forkery:
croaky/dotfilesπͺ¦οΈ- thoughtbot/dotfiles π€οΈ
- thoughtbot/laptop π€οΈ
- dot-local π€οΈ
- holman
- jacobwgillespie
Latest iteration is specifically heavy from rholman && jacobwgillespie. ποΈ
I personally prefer .private instead of .local and have a separate ποΈ repo ποΈ that symlinks (& sources from there...):
vimrc.private.symlinkzshrc.private.symlink
You are not missing anything, I assure you. (alias for directory changes that I do not want to put on blast basically either for NDA or contract purposes.) π€£οΈ