Skip to content

mrcgrtz/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

My homegrown dotfiles repository which in the meantime is VERY much inspired by the work of Mathias Bynens and Paul Irish. If you really want your own dotfiles repository, fork one of these. They have awesome setups!

Installation

Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you do not want or need. Do not blindly use my settings unless you know what that entails. Use at your own risk!

Using Git and the bootstrap script

You can clone the repository wherever you want. (I like to keep it in ~/dotfiles.) The bootstrap script will pull in the latest version and copy the files to your home folder.

git clone https://github.com/mrcgrtz/dotfiles.git && cd dotfiles && source bootstrap.sh

To update, cd into your local dotfiles repository and then:

source bootstrap.sh

Alternatively, to update while avoiding the confirmation prompt:

set -- -f; source bootstrap.sh

Git-free install

To install these dotfiles without Git:

cd; curl -#L https://github.com/mrcgrtz/dotfiles/tarball/main | tar -xzv --strip-components 1 --exclude={README.md,LICENSE.md,init}

To update later on, just run that command again.

Specify the $PATH

If ~/.path exists, it will be sourced along with the other files, before any feature testing (such as detecting which version of ls is being used) takes place.

Here is an example ~/.path file that adds /usr/local/bin to the $PATH:

#!/usr/bin/env sh

export PATH="/usr/local/bin:$PATH";

Add custom commands without creating a new fork

If ~/.extra exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you do not want to commit to a public repository.

My ~/.extra looks something like this:

#!/usr/bin/env sh

# Git/GitHub credentials
# https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables#_committing
# Not in the repository, to prevent people from accidentally committing under my name.
GIT_AUTHOR_NAME="Marc Görtz";
GIT_AUTHOR_EMAIL="[email protected]";
GITHUB_USER_NAME="mrcgrtz";
git config --global user.name "$GIT_AUTHOR_NAME";
git config --global user.email "$GIT_AUTHOR_EMAIL";
git config --global github.user "$GITHUB_USER_NAME";

You could also use ~/.extra to override settings, functions and aliases from my dotfiles repository. It is probably better to fork this repository instead, though.

Install Homebrew formulae

When setting up a new Mac, you may want to install some common Homebrew formulae:

source ./init/brew/install-brew-formulae.sh

This also installs Homebrew if it is not yet installed.

Installed software via Homebrew

If you want to install some native macOS apps, the script will ask you for permission to installs apps using Cask and mas. The app setup is tailored for myself, so just say no if you do not trust my guts.

My favorite parts

There are so many goodies!

The “readline config” (.inputrc)

Basically it makes typing into the prompt amazing:

  • Tab like crazy for autocompletion that does not suck. Tab all the things. Srsly.
  • No more <tab><tab> that says ”Display all 1337 possibilities? (y or n)”. Yay!
  • Type cat <uparrow> to see your previous cats and use them.
  • Case insensitivity.
  • Tab all the livelong day.

Moving around in folders (z, ..., cdf)

z helps you jump around to whatever folder. It uses actual real magic to determine where you should jump to. Separately there is some ... aliases to shorten cd ../.. and .., .... etc. Then, if you have a folder open in Finder, cdf will bring you to it.

z dotfiles
z blog
....      # drop back equivalent to cd ../../..
z public
cdf       # cd to whatever is up in Finder

z learns only once its installed so you will have to cd around for a bit to get it taught.

Lastly, I use o to open Finder from this path. (That is just available normally as open ..)

The prompt

I use Pure for my zsh prompt with a Catppuccin color palette.

Screenshot

Screenshot of my prompt

The nerdy details

Feedback

You are quite welcome to make suggestions or improvements, however I may decline if it is not of personal value to me.

Acknowledgements

Inspiration and code was taken from many sources, including:

License

My dotfiles are released into public domain under the Unlicense so you can do whatever you want with it. Fork! Copy! Adapt!