Skip to content

shiki/dotfiles

Repository files navigation

.files and macOS setup

Contains macOS configuration files for various apps and instructions for setting up a new Mac.

Table of Contents

Preparation

  1. Update everything that is available in the App Store

  2. Install Xcode

  3. Install Homebrew

  4. Clone this repo to a local dir (e.g. ~/.files).

    git clone git@github.com:shiki/dotfiles.git ~/.files

General

Homebrew Packages

brew install dropbox google-chrome google-chrome@canary slack firefox notion zoom
brew install visual-studio-code
brew install sequel-ace
brew install alfred appcleaner marta keepassxc omnidisksweeper rectangle espanso
brew install adobe-acrobat-reader handbrake
brew install git lnav tree wget gh
brew install proxyman

# Install JuliaMono Typeface (https://juliamono.netlify.app/)
brew tap homebrew/cask-fonts
brew install --cask font-juliamono

Others

These aren't installed through Homebrew

macOS

# Always show hidden files
defaults write -g AppleShowAllFiles -bool true
# Restart Finder 
killall Finder

# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

Oh My Zsh!

  1. Install ohmyzsh

  2. Install dependencies

    brew install zoxide fzf
  3. Symlink dotfiles/.zshrc to ~/.zshrc

    ln -s ~/.files/.zshrc ~/.zshrc

Alfred

Follow the instructions in Sync your Alfred settings between Macs to synchronize the settings using Dropbox.

These workflows should be automatically installed:

Espanso

Symlink dotfiles/espanso to the path defined by the espanso path config command.

symlink_target=$(espanso path config) && rm -rf "$symlink_target" && ln -sf ~/.files/espanso "$symlink_target" 

NodeJS

  1. Install nvm.

  2. Install the latest Node version.

    nvm intall node

Ruby

  1. Install rbenv

    brew install rbenv
  2. Install the latest Ruby version.

    # List all available versions
    rbenv install -l
    
    # Install
    rbenv install <version>
  3. Set it as the global version.

    rbenv global <version>
  4. Install global Ruby packages.

    gem install bundler cocoapods
  5. Prepare Cocoapods repo. This usually takes a long time.

    pod setup

Git

git config --global user.name "Shiki"
git config --global user.email "GITHUB_NOREPLY_EMAIL_ADDRESS"

VS Code

VS Code settings are synchronized using the built-in Settings Sync. Turn the Settings Sync on and log in using GitHub.

Disable press and hold so that VS Code will repeat any key that is being held:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false   

Spacemacs

  1. Install Emacs-plus.

  2. Follow instructions in here to install Spacemacs.

  3. Symlink .spacemacs

    mv .spacemacs .spacemacs.bak
    ln -s .files/spacemacs/.spacemacs .spacemacs

MacVIM

  1. Symlink .vim

    $ ln -s ~/.files/vim/vim.symlink ~/.vim
  2. Install Vundle. Follow all instructions until the :PluginInstall has been executed

  3. Symlink .vimrc

    $ rm ~/.vimrc
    $ ln -s ~/.files/vim/vimrc.symlink ~/.vimrc
  4. In MacVIM, run :PluginInstall to install all plugins. This instructs the Vundle package to install all the other packages managed by it.

  5. The VIM config uses DejaVu Sans Mono for Powerline. For VIM to use this font in the terminal, make sure to set this font as the default font in the Terminal or iTerm2.

iOS Development

Xcode

  1. Install the XVim2 plugin.
  2. Install the custom keybindings.
    1. Symlink XVim.idekeybindings.symlink
      ln -s ~/.files/xcode/KeyBindings/XVim.idekeybindings.symlink ~/Library/Developer/Xcode/UserData/KeyBindings/XVim.idekeybindings
    2. Enable the keybinding in XCode → Preferences → Key Bindings
  3. Symlink the .xvimrc
    ln -s ~/.files/xcode/.xvimrc ~/.xvimrc

AppCode

Install AppCode via Homebrew:

$ brew cask install appcode

AppCode settings are synchronized using a git repo.

  1. Follow the instructions in Share settings through a settings repository.
  2. Use the appcode-settings Github repo.

iOS Dev Tools

brew install simsim swiftformat

Android Development

Android Studio

Install Android Studio via Homebrew:

brew install android-studio

Android Studio settings are synchronized using a git repo.

  1. Follow the instructions in Share settings through a settings repository.
  2. Use the android-studio-settings Github repo.

Android Dev Tools

brew install scrcpy

PHP Development

  1. Install php

    brew install php
    
  2. Install phpbrew.

  3. Install PhpStorm.

    brew install phpstorm
    

Settings are synchronized using IDE settings sync using my Jetbrains account.

Ansible

Install pyenv.

brew install ansible

Java

brew install --cask temurin
brew install intellij-idea

Browsers

Chrome

Install these extensions.

Firefox

Install these extensions.

iTerm2

Install themes from http://iterm2colorschemes.com/

  • Flatland
  • Dracula
  • Hardcore
  • Japanesque
  • Space Grey Eighties Dull

Others

  1. Change the default DNS
  2. Add a Quick Action to convert HEIC to JPEG
  3. Enable zoom by checking Settings → Accessibility → Zoom → Use scroll gesture with modifier keys to zoom

References