Ed Heltzel's personal configuration for MacOS and Fish shell.
My playground revolves around DevOps and Full stack web development.
π§° Terminal toolkit with replacements for Unix commands
I find tools that are built with Rust or Go to be performant and cover 90% of my use cases.
- bat Rust replacement for
cat
- bottom Rust replacement for
top
- Bun - A drop-in-replacement for NPM/PNPM/Yarn - written in Zig
- eza Rust replacement for
ls
- fd Rust replacement for
find
- fzf a mostly Go fuzzy finder
- procs Rust replacement for
ps
- ripgrep Rust replacement for
grep
- sd Rust replacement for
sed
- starship Rust prompt
- tealdeer Rust replacement for
man
- topgrade Rust replacement for package manager updates
- zoxide Rust companion for
cd
and replacement for z and auto jump- zoxide fish - Fish plugin for zoxide
Caveats If you are on any version of macOS that uses AFPS, you'll need to disable the SIP. First check to see if SIP is enabled or not.
csrutil status
output should read:
System Integrity Protection status: enabled.
If your SIP is enabled, then follow the next steps to disable it β Assuming that you know what you're doing, here is how to turn off System Integrity Protection on your Mac.
- Turn off your Mac (Apple > Shut Down).
- Hold down Command-R and press the Power button. Keep holding Command-R until the Apple logo appears.
- Wait for OS X to boot into the OS X Utilities window.
- Choose Utilities > Terminal.
- Enter csrutil disable.
- Enter reboot.
csrutil status
-> should readSystem Integrity Protection status: disabled.
I use ssh keys to authenticate with GitHub and other services. You generally want to create new keys for each device you use, but you can also use the same key on multiple devices. I have started using two different keys for my multi-machine work flow. One key is for my personal devices and the other is for my work devices. This allows me to easily revoke access to my work devices if I discontinue a relationship with a company or customer, and not have to worry about my personal keys being compromised or having to change them.
If you look at the .gitconfig
you'll see the use of two different keys.
- Restore your safely backed up ssh keys to
~/.ssh/
- I personally use Dropbox to keep these keys and configuration in sync with my devices, it's not ideal but works for me:
touch ~/Dropbox/.ssh-config && ln -s ~/Dropbox/.ssh-config ~/.ssh/config
- Again you can alternatively, generate new ssh keys, and add these to your GitHub account.
- Clone this repository
git clone [email protected]:edheltzel/dotfiles.git
- Run the
bootstrap.sh
script- Alternatively, only run the
setup.sh
scripts in specific subfolder if you don't need everything - You must start with the./packages/.setup.sh
script first. This will prevent any installation errors.
- Alternatively, only run the
- Install Fisher and Plugins -- Optional
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher
I would encourage you to play around with the configurations so you can add or remove features. If you would like to use these dotfiles for yourself, I'd recommend changing following:
-
- The
.gitconfig
file includes my[user]
config, replace these with your own user name and email as well as the[include]
path for your local gitconfig.- Almost all of git aliases are located in
.gitconfig
versus_aliases.fish
orfish/functions/setup.fish
- I've found this to work best for me.
- Almost all of git aliases are located in
- Also check the
.gitignore_global
for anything you might want to add or remove. - I would also change the name of the local gitconfig file to match your setup.
gitconfig-bigmac.local
andgitconfig-macdaddy.local
are my two local gitconfig files.
- The
-
- At the top of the setup.sh file, my computer name is set as
MacDaddy
- might want to change it.
- At the top of the setup.sh file, my computer name is set as
-
This folder is a collection of the programs and utilities I use. The lists can easily be amended for your workflow.
Brewfile
python_packages.txt
ruby_packages.txt
rust_packages.txt
pnpm_packages.txt
If you would rather run each text file individually, you can run the following command as an example:
Fish π
pnpm add --global (cat pnpm_packages.txt)
Bash πpnpm add --global $(cat pnpm_packages.txt)
-
This folder is a collection of repos I like to sync between my machines. The lists can easily be amended for your workflow. Just add the repo name to the
txt
file and it will be cloned. To customize, just update the name of theoss.txt
file to match the name of the directory you want these repos to be cloned to.oss.txt
- My personal OSS projects that I like to keep in sync
- bootstrap.sh - Calls all setup.sh scripts and executes.
setup.sh - Symlinks all .files
to their corresponding location in ~/.config/
- bat/
- iterm/
- raycast/
- utils/
- vscode/
- .ackrc
- .gemrc
- .gitnow
- .hushlogin
- .nirc
- .npmrc
- .profile
- .tigrc
- .tmux.conf
- .vsce
- .wgetrc
- .zhsenv
- .zshrc
- setup.sh - Sets the default app for the different file extensions.
app.package.id
- Contains all extensions for the specified program (runtldr duti
ORman duti
to learn more)
-
setup.sh - Symlinks all fish files to their corresponding location in
~/.config/fish/
-
config.fish - Global fish configuration (.fishrc)
-
fish_plugins
- list of Fisher plugins to install -
completions/
- alacritty.fish - Contains all completions for the
alacritty
command - tmuxinator.fish - Contains all completions for the
mux
command
- alacritty.fish - Contains all completions for the
-
conf.d/
- abbr.fish - Contains all abbreviations
- colors.fish - Contains all color definitions
- exports.fish - Contains all exports
- fnm.fish - Contains all fnm completions
- paths.fish - Contains all paths
- tmux.fish - Contains all tmux completions
- variables.fish - Contains all variables ie:
$EDITOR
-
functions/
- _aliases.fish - Contains all aliases
- _utils.fish - Contains special scripts
- abbrex.fish - Utility for expanding abbreviations in fish-scripts
- btm.fish - Runs [btm]
- cd.fish - Changes directory and lists contents
- cp.fish - Copies files and directories
- cpwd.fish - Copies the current working directory to the clipboard
- fish_greeting.fish - My personal fish greeting using the full-color fish logo
- git-undo.fish - Undo a the last commit message and reset the HEAD
- imgcon.fish - Converts images to different formats
- mkbak.fish - Creates a backup of a file
- mkd.fish - Creates a directory and changes into it
- pubkey.fish - Copies the public key to the clipboard
- reload.fish - Reloads fish
- restore.fish - Restores a file from a backup
setup.fish - reloads and sets fish abbreviations- DEPRECATED - useabbr -a
inside ofconf.d/abbr.fish
instead- upp.fish - macOS ONLY checks current global node version and runs
topgrade
command - weather.fish - using wttr.in to check the local weather
- wget.fish - alias for
wget -c
- speed.fish - macOS ONLY leverages the built-in
networkQuality
cli tool - just a glorified alias but works with all the flag options
speed summary
> speed ==== SUMMARY ==== Uplink capacity: 232.603 Mbps (Accuracy: High) Downlink capacity: 887.549 Mbps (Accuracy: High) Responsiveness: Medium (570 RPM) (Accuracy: High) Idle Latency: 32.708 milliseconds (Accuracy: High) Interface: en0 Uplink bytes transferred: 363.870 MB Downlink bytes transferred: 1.987 GB Uplink Flow count: 20 Downlink Flow count: 16 Start: 8/27/23, 5:32:12 PM End: 8/27/23, 5:32:32 PM OS Version: Version 13.5.1 (Build 22G90)
- using Topgrade by r-darwish -- see
prompt > topgrade.tmol
for config options. - a fish function exist
upp
to check current global node version and to run thetopgrade
command
- setup.sh - Symlinks all git files to
~/
- .gitignore_global - Contains global gitignores, such as OS-specific files and several compiled files
- .gitconfig - Sets several global Git variables - also include GPG signing
This is the my preferred way setup for Git Commit/Tag Signing. Using your SSH key "simplifies signing Git commits and tags" on both Github and Gitlab. This is a great way to secure your commits and verify that you are the one making the commits, without all the setup and maintaining hassle GPG can come with. IDK why but sometimes it just stops working Β―_(γ)_/Β―
The .gitconfig
includes a line that adds support for an additional gitconfig file .gitconfig.local
- my personal setup uses two different Macs and this is how I achieve commit signing with each machine.
[meta]
isLocalConfig = true
[user]
signingkey = PATH_TO_YOUR_KEY
[gpg "ssh"]
allowedSignersFile = PATH_TO_YOUR_ALLOWED_SIGNERS_FILE
- PLEASE REVIEW
./git/setup.sh
, this script checks what the computer name is and sets the.gitconfig.local
, you'll want to update this to your computer name.
(optional): GPG signing is set to TRUE
by default π If you DO NOT want to enable GPG run git config --global commit.gpgsign false
and remove the GPG packages from the Brewfile.
Generate new key and assign to global git config
main take away:
gpg --list-secret-keys --keyid-format=long
- Copy key
- set key for your git user
git config --global user.signingkey <your key>
git config --global user.signingkey
- If you need help setting this up GPG:
- follow the Github article for Signing Commits to set up you GPG key(s).
- I found this GIST helpful
- To get VSCode setup follow this article
- Please Note if you used the Brewfile, Cask installed the macOS GPG Suite via
cask 'gpg-suite-no-mail'
-- (alternatively) update the Brewfile with `cask 'gpg-suite' to include GPGMail.
- setup.sh - Executes a long list of commands pertaining to macOS Preferences
- I can not stress enough to read this and change this for what works for you.
- DO NOT blindly run this script - it is a WIP with each macOS update things change.
- setup.sh - Symlinks all the associated rc and other dot files to your
~/
(home directory) - Special Mentions:
- setup.sh - Installs the contents of the package manager files and the Brewfile
- setup.sh - Clones the repositories in the `` files at the corresponding locations
I use NeoVim, when I need Vim. The distribution I use is LazyVim
- setup.sh - Clone LazyVim to
~/.config/nvim
- functions.sh - Contains helper functions for symlinked files and printing progress messages
Node Version switching for Node development, takes advantage of fnm for managing Node versions, which supports both .nvmrc
and .node-version
files.
- Install happens in the
Brewfile
by running
brew install fnm
For Completions run:
fnm completions --shell fish
Make sure you run:
./fish/./setup.sh
This will symlink the fnm.fish
file in ~/.config/fish/conf.d
(It might be helpful to source ~/.config/fish/config.fish
)
Note: FNM has the ability to auto switch Node versions if there is a .node-version
or .nvmrc
file - this is enabled by default
# automatically run fnm use
fnm env --use-on-cd | source
Please note that when you change your default Node version, you will need to run
npm install --global (cat node_packages.txt)
to includecorepack
in the global packages. This will ensure thatpnpm
andyarn
are available.
Gotta thanks to kalis.me blog post for the simple setup, and inspiration.