ahmetb / dotfiles

Ahmet's dotfiles and macOS customizations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ahmet’s macOS Setup

Download Xcode

For google, go/xcode. This will take a lot of time, so start with this.

OS Settings

TODO: find defaults write commands for these.

  • Invert Trackpad Scroll Direction to non-natural.

  • Show battery percentage on menu bar.

  • Show date on menu bar.

  • Keyboard → Text → Uncheck autocorrect and such settings.

  • Remove useless items from the Dock.

  • Move Dock to right, make it smaller.

  • Drag Downloads folder next to the Trash on the Dock.

    • Right Click → Sort by Date Added.
  • Show Path Bar on Finder.

  • Move $HOME folder to Finder sidebar.

  • Set shortcuts

    • Accessibility: Invert colors: Cmd+Shift+I
    • Screenshots:
      • Uncheck all
      • Save selected area to file: Cmd+Shift+4
      • Save selected area to clipboard: Cmd+Shift+2
  • Hot Corners:

    • Top-left: Put Display to Sleep
    • Clear other corners

Tweaks:

defaults write NSGlobalDomain AppleShowScrollBars -string "Always" # show scrollbar always
defaults write com.apple.finder AppleShowAllFiles true   # Show hidden files
defaults write com.apple.finder ShowStatusBar -bool true # Show Finder statusbar

# Default Finder location is the home folder
defaults write com.apple.finder NewWindowTarget -string "PfLo" && \
  defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}"

chflags nohidden ~/Library                               # Unhide ~/Library

# disable smart quotes and dashes
defaults write 'Apple Global Domain' NSAutomaticDashSubstitutionEnabled 0
defaults write 'Apple Global Domain' NSAutomaticQuoteSubstitutionEnabled 0
defaults write 'Apple Global Domain' NSAutomaticPeriodSubstitutionEnabled 0

Shell

Install oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh

Package manager

  • Install Homebrew —to $HOME/.homebrew instead of /usr/local:

    git clone https://github.com/Homebrew/brew.git $HOME/.homebrew
    
  • Run which brew to confirm the one in home directory is picked up.

  • Run brew analytics off

Installing software manually

  • Download Dropbox
    • Sign in
    • Sync only 1Password
  • Download iPassword 6
    • Choose .opvault file from Dropbox
    • Go to Software Licenses → open the 1Password license file
    • Accept to use 1Password Mini when prompted

Installing software via Homebrew

All software installed on the system must be listed in .Brewfile. This is symlinked at ~/.Brewfile and used by brew bundle.

To install all the software, add it to .Brewfile and run:

brew bundle --global

Some stuff will take long, in that case, identify which packages and update .Brewfile to install them with args: ['force-bottle'] or do a one-off brew install --force-bottle [pkg] install.

Some things that require manual installation after Homebrew:

# if pip requires sudo, something is wrong, because the
# Homebrew bundle should install a $USER-writable over system-python.
    
pip install virtualenv
pip install virtualenvwrapper

Post-Installation Configuration

  • Rectangle

    • Security->Accessibility: Give access
    • Launch at Login
  • Clipy

    • Launch at Login
    • Hide from Menu Bar
    • Set history size to 200
    • Set paste key to Cmd+Shift+V
  • fzf completion scripts:

    "$HOMEBREW_PREFIX"/opt/fzf/install
    
  • minikube xhyve driver:

    # minikube uses xhyve, which requires privileged access to the hypervisor
    sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
    sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
    

Settings Sync

  • Clone this repo and run install_symlinks.sh

    • Open a new terminal to take effect.
  • iTerm2->Preferences->Load Preferences From: com.googlecode.iterm2.plist directory.

    • Restart iTerm2.
  • For GPG instructions, follow .gnupg/README file.

  • VSCode:

    • Install "Settings Sync" extension and reload.
    • Run '> Sync: Download Settings'
    • Enter gist ID in vscode.sync file to prompt.
    • Once extensions are installed 'Reload' (or Restart)
    • Run '> Sync: Update/Upload Settings'
    • Create a token with 'gist' permissions and save it to the prompt
    • Wait for the Sync Summary.

Git Setup

Run:

./git_setup.sh

Generate key with a password:

ssh-keygen -f $HOME/.ssh/github_rsa

(You may want to redact hostname from the public key.)

Add key to the keychain:

ssh-add $HOME/.ssh/github_rsa          # company-installed
/usr/bin/ssh-add $HOME/.ssh/github_rsa # system

Upload the key to GitHub. https://github.com/settings/keys :

cat ~/.ssh/github_rsa.pub| pbcopy

Save this to ~/.ssh/config:

Test connection:

ssh -T git@github.com -i ~/.ssh/github_rsa

Hardware

About

Ahmet's dotfiles and macOS customizations

License:Apache License 2.0


Languages

Language:Shell 58.6%Language:PHP 13.2%Language:C++ 10.9%Language:Ruby 7.8%Language:Vim Script 4.9%Language:HTML 4.6%