I landed into a new world this month, apart from the obvious change of scenery, I had the chance to be given a brand new mac !

After a few hours of installing required bits and pieces needed to be vetted to access the network I was able to install all my bits and pieces that will make it my mac !

TOC:

  1. zsh
  2. “Oh My ZSH!”
  3. iTerm2
  4. Spectacle
  5. Homebrew
  6. git

zsh

First change the default shell to zsh:

chsh -s /bin/zsh

“Oh My ZSH!”

Next install “Oh My ZSH!” like this:

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Configured in my ~/.zsrc file like this:

ZSH_THEME="agnoster"
plugins=( git git-extras gitfast iterm2 zsh-autosuggestions zsh-syntax-highlighting )

There are plenty of available themes and plugins available…

iTerm2

I’m a big fan of iTerm2 and it’s quake like hotkey window.

There are multiple ways of creating the desired effect, here the one I currently used :

  1. On iTerm2’s preference pane, select profiles and the the default Profile
  2. select the Window Tab and choose (in lower right) Full-Width Top of Screen in the Style combo box.
    iTerm2
    iTerm2
  3. select the Keys Tab and enable the hotkey window (lower part) and configure your prefered key combination to toggle the terminal.
    iTerm2 Hotkey
    iTerm2 Hotkey
    I chose Double-tap key and ^ Control
    iTerm2 hotkey configuration
    iTerm2 hotkey configuration

That does the trick for me, one little thing when using the terminal is the use of ^← of ^→ to navigate in the cli, those combination of keys are eaten by macos… I chose to remove them :

  1. head to macOS System Preferences.
  2. Select the Keyboard and then the Shortcuts tab
  3. Select Mission Control on the left pane
  4. Disable Move left a space and move right a space

keyboard shortcut preferences
keyboard shortcut preferences

Spectacle

This is one of my favorite window organizing tool from the keyboard. It’s open source and binaries are downloadable from the spectacleapp.com website.

Homebrew

The missing package manager for macOS : brew.sh, install from cli :

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

First use of thre brew command was to install my git environement

Git

macOS comes with a fairly new version but I like to have the latest, thanks to homebrew it’s just a command away brew install git

Since I’m a rebase fan git config --global branch.autosetuprebase always

I like also to pimp up my cli git diff view thanks to diff-so-fancy, brew install diff-so-fancy

following their instructions, I configured git globally like this :

git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"

git config --global color.ui true

git config --global color.diff-highlight.oldNormal    "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal    "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"

git config --global color.diff.meta       "yellow"
git config --global color.diff.frag       "magenta bold"
git config --global color.diff.commit     "yellow bold"
git config --global color.diff.old        "red bold"
git config --global color.diff.new        "green bold"
git config --global color.diff.whitespace "red reverse"

I play also with gitmoji to pimp my commit messages:

brew install node
npm install -g gitmoji-cli