This guide helps me set up my macOS laptop in a fairly simple manner. I'll need to go back to this guide roughly every 2–3 years. Maybe it'll help you, too!
Use Karabiner Elements
Map Caps Lock to Ctrl (when long-pressed) or Escape (when tapped). See this guide
Use Karabiner Elements
adding the following entry in Simple Modification – For all devices –
non_us_backslash
->grave_accent_and_titlde
.
On a German keyboard, this changes caret key to produce the backtick/tilde characters, which is very frequently needed for coding and hard to reach when it's to the left to the Y/Z key.
Gotta go faster than the defaults
defaults write -g InitialKeyRepeat -int 13
defaults write -g KeyRepeat -int 1
You need to log out and log in again to make these settings take effect. source
Necessary
- iTerm2 with solarized theme
- apptivate
- spectacle - no longer maintained but it still works
Optional
- cleanshot X - screenshots that you can draw on. I didn't know I needed this! Best feature: you can OCR strings on your screen ("Capture Text")
The package manager for macOS that's not great but kinda works
Create the initial version of the Brewfile:
brew bundle dump
Re-install from scratch
brew bundle --force --cleanup
This distribution works best for me
- Reuse previous session's directory https://apple.stackexchange.com/a/148514
- Unlimited scrollback buffer https://stackoverflow.com/a/27616555
- atuin: Magicall shell history by pressing
^R
https://github.com/atuinsh/atuin - zsh-z https://github.com/agkozak/zsh-z
Put this in your ~/.gitconfig
:
[push]
default = current
autoSetupRemote = true
[alias]
st = status -sb
co = checkout
c = commit -v
a = add -p
i = !git add -N . && git add -p
wip = commit -mWIP
pp = "!git fetch && git merge --no-edit && git push"
trash = "!f() { branch=$(git symbolic-ref --short HEAD); git reset --hard \"origin/$branch\" ;} ;f"
sync = fetch origin main:main
leaderboard = shortlog -s -n --no-merges
branches = for-each-ref --sort=committerdate refs/heads/ --format="%(authordate:short)%09%1B[0;33m%(refname:short)%1B[m%09"
touched = diff --relative --name-only main...