Skip to content

πŸ“”οΈ A set of scripts to set up a machine. Terminal, Languages, Databases, Applications, etc.

Notifications You must be signed in to change notification settings

JeromeFitz/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’½οΈ @jeromefitz/dotfiles

Scripts (zsh && Homebrew) to set up and keep a machine up-to-date (macos).

⏱️ Speed Test

β–² 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

⬇️ Download

πŸ₯οΈ 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

:octocat: 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 git@github.com:JeromeFitz/dotfiles.git

git clone https://github.com/JeromeFitz/dotfiles.git ~/.dotfiles

♻️ Install

cd ~/.dotfiles

# Brewfile
sh ./scripts/bootstrap

# # # OR # # #

# Brewfile-Slim
sh ./scripts/bootstrap -s

This will go through:

  • :octocat: git config
  • πŸ”—οΈ symlinks
  • 🍺️ homebrew install (+ post installs)
    • πŸ’ŽοΈ Brewfile|Brewfile-Slim
  • πŸ› οΈ zsh configuration
  • πŸ€“οΈ zsh functions

πŸ“ NOTE: node sometimes gets installed immediately, other times you may need to run this twice.

:octocat: git config

Prompt for git: username|authorname|authoremail

Sets up gitconfig.private.symlink which is included w/in gitconfig.symlink and not attributed to repo. πŸ™ˆοΈ

🚩 Multiple Git Accounts

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.custom

Where 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 = j@jeromefitzgerald.com

./symlinks/gitconfig.private.custom.symlink

[gitlab]
  user = CustomHandle
[user]
  name = Last, First
  email = j@custom.com

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: j@jeromefitzgerald.com

πŸ”—οΈ symlinks

Will set up ~/.[xyz] with:

└─── symlinks
β”‚   β”‚   hyper.js.symlink
β”‚   β”‚   zshrc.symylink
β”‚   β”‚   *.symlink

🍺️ homebrew install

Peep the Brewfile|Brewfile-Slim in root to see what all will be installed.

Afterward, this will run every install located in:

└─── config
β”‚   β”‚  *.install.sh

🧹️ homebrew cleanup

brew bundle cleanup

Will show any installation from Homebrew not in Brewfile.

brew bundle cleanup -f

Will uninstall those extra brew|cask|tap|....

πŸ› οΈ zsh configuration

└─── config
β”‚   β”‚   sandboxd.plugin.zsh
β”‚   β”‚   *.path.zsh
β”‚   β”‚   *.!completion.zsh
β”‚   β”‚   *.completion.zsh

πŸ”₯️ config.setup.zsh

Created/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-setup

And 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.

πŸ₯ͺ️ sandboxd

Utilizes sandboxd for:

  • nvm
  • pyenv
  • ruby

πŸ“οΈ Note: On new boxes you will need to install node|python|ruby accordingly.

πŸ€“οΈ zsh functions

dot is a simple script that installs some dependencies, sets sane macOS defaults, and so on. Tweak this script, and occasionally run dot from time to time to keep your environment fresh and up-to-date. You can find this script in bin/.

ref: @holman/dotfiles

🚈️ Slim

dot -s will run from Brewfile-Slim which is a reduced Brewfile.

πŸ™‡οΈ References

Over the years I have revamped this a bit through inspiration and sheer 🍽️ forkery:

Latest iteration is specifically heavy from rholman && jacobwgillespie. πŸ†οΈ

πŸ”’οΈ *.private

I personally prefer .private instead of .local and have a separate πŸ”’οΈ repo πŸ”’οΈ that symlinks (& sources from there...):

  • vimrc.private.symlink
  • zshrc.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.) 🀣️

About

πŸ“”οΈ A set of scripts to set up a machine. Terminal, Languages, Databases, Applications, etc.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •