Skip to content

mfilej/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

885 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~/.dotfiles

What works for me. Might not work for you. Slowly evolved over the years, inspired by these fine people: @garybernhardt, @mislav, @tpope, @mihar, @lukerandall.

Philosophy

  1. Use built-in tools when possible, switch to something else when it hurts.
  2. Extend functionality instead of replacing it. For example: someone who (only) knows vanilla vim should still be able to pair with me, because all the original bindings are still available.

How do files in this repository end up in my home directory?

Using a few jj commands, documented in the chapter Finally, dotfiles. This allows us to sidestep symlinks almost completely, with the exception of a few sensitive files that we store in iCloud Drive. Credit to @hjr3 for the guide. (Previously, I relied on a similar technique based on git).

Setting up a new computer

Take a deep breath through your nose and savour the smell of your new computer.

Follow the operating system's first time start-up wizard.

System Settings

Use the search function to find the relevant settings. Things get moved around more often than I set up new computers, so the exact labels might differ.

  • Check for updates and wait for them to finish installing.
  • Change the computer name..
  • Make sure FileVault is enabled and store the recovery key (comes enabled by default on new computers).
  • Disable Screen saver.
  • Privacy & Security: Give Full Disk Access to Terminal.app.

Keyboard

  • Customize modifier keys (for laptops).

Finally, dotfiles

Use the one-liner from brew.sh to install Homebrew. The script will take care of installing Command Line Tools for Xcode. Run brew install jj so we can move on to setting up dotfiles.

Caution

zerobrew is now a thing, so this section might need to be updated accordingly.

alias jj=/opt/homebrew/bin/jj
echo '*' > ~/.gitignore
jj git init
jj git remote add origin https://github.com/mfilej/dotfiles.git
jj git fetch
jj bookmark track main --remote=origin
jj rebase -d main@origin

Note

After rebasing, jj will detect a conflict because earlier we manually created a .gitignore file. You can resolve the conflict by accepting the suggested restore command as mentioned in the error message.

At this point jj status should look clean.

Now that Homebrew has installed the fish shell we can set up our shell:

Add the following to your $PATH:

fish_add_path /opt/homebrew/bin/ /opt/homebrew/sbin/ ~/bin/

And clear the default fish greeting:

 set -U fish_greeting

Open a new Terminal window one more time (or just run fish) and check $PATH to make sure the above worked.

With $PATH in place, we can install everything from the global Brewfile:

brew bundle --global

Note

QuickLook plugins installed via Homebrew are quarantined. Follow these instructions for removing the quarantine attribute: https://github.com/sindresorhus/quick-look-plugins

Now that the dotfiles are checked out, you might want to hide certain files and folders so they don't show up in the Finder.

chflags hidden bin README.md

Authenticate git for GitHub:

gh auth setup-git
gh auth login

Finally, install mise to ~/.local/bin and run the bootstrap command:

curl https://mise.run | sh
~/.local/bin/mise bootstrap

Launchbar

trash /Users/miha/Library/Application\ Support/LaunchBar/{Actions,Snippets}
ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/Sync/LaunchBar/{Actions,Snippets} /Users/miha/Library/Application\ Support/LaunchBar/

Configure indexing as follows:

  • For Safari Reading List, Safari Top Sites, Safari iCloud Tabs:
    • Check Access items via sub-search only.
  • Do the inverse for Emoji.
  • Indexing the iCloud Drive directory is complicated. Out of the box you won't be able to access all its contents via LaunchBar nor will you be able to limit indexing like you can for regular directories. To work around these issues, disable the default index, then manually re-add it as a regular folder. Under Options, limit Search Scope to Search 2 Subfolder Levels and set Search for to Folders.

Finder

  • Under Tags, uncheck everything.
  • Under Sidebar edit as needed.

Safari

  • From the Extensions pane, install and enable extensions
  • Under the Feature Flags pane, search for "60" and uncheck Prefer Page Rendering Updates Near 60fps

sshd

Edit /etc/ssh/sshd_config as follows:

PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no

Then restart the daemon:

sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

About

fish, jj, mise, homebrew, macOS 🔧

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors