Skip to content

Dotfiles for macOS (relevant for Catalina 10.15+)

License

Notifications You must be signed in to change notification settings

mvshmakov/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

macOS Config Icon

Dotfiles for macOS (relevant for Catalina 10.15+)

Setup

sudo softwareupdate -i -a

mkdir -p ~/projects/personal && cd ~/projects/personal
git clone https://github.com/mvshmakov/dotfiles.git && cd dotfiles

git submodule update --recursive --init
stow --stow -vt ~ */

./home/scripts/setup.sh

To restow/repair the symlinks, use stow --restow -vt ~ */. To simulate the stow process outcome without modifying the file system, use stow --stow --no -vt ~ */. */ is the ZSH glob, which expands only in the folders.

If you want to add the submodule, consider running git submodule add --name {name} https://github.com/{author}/{name}.git {tool}/.config/{tool}/{name} instead of just adding the corresponding submodule definition in the .gitmodules. If you want to delete the submodule, see delete_git_submodule.md.

ITerm2's com.googlecode.iterm2.plist is in the $HOME folder, so you need to set it also in ITerm2 settings to load it.

The last step would be to generate new SSH key pair and add it to the required services.

One should also enable the Reduced motion option in the System Preferences to increase the speed of window/desktop switching.

Useful commands

  1. Dump all the installed brew packages: brew list > packages.txt
  2. Dump all the installed brew casks: brew list --cask > casks.txt
  3. Dump all VSCode extensions to shell commands: code --list-extensions | xargs -L 1 echo code --install-extension
  4. stow --restow {directory}

Z-based navigation

  • z {pattern}[TAB] will expand the path Z detected

Comments for packages in the brew folder

  • The bat is a good alternative to the cat for JSON files.

If you want your current system configuration to match your Brewfile (purge all non-fixed deps)

brew bundle --force cleanup

How to upgrade brew:

  • brew update (update brew itself) is superseded by brew autoupdate start --greedy
  • brew upgrade --greedy update all the packages together with :latest and :auto_update

Neovim after stow

  • Run :Copilot setup

TODO

  • Warn about exiting from the git commit message template on non-empty message.
  • If possible, simplify the GPG signature sign in git log to make it smaller but still present.
  • Use markdownlint for the documentation.
  • Run prettier on md/yml/etc. on pre-commit.
  • Use shfmt + shellcheck + checkbashisms on scripts from dotfiles + document it.
  • Align all shell scripts with Google shell scripting guidelines + apply all the linting.
  • Run CI with pre-commit hooks.
  • Use git subtree instead of git module to manage dependencies.

Useful links

Literature