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 !
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…
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 :
- On iTerm2’s preference pane, select profiles and the the default Profile
- select the Window Tab and choose (in lower right)
Full-Width Top of Screenin the Style combo box.
- select the Keys Tab and enable the hotkey window (lower part) and configure your prefered key combination to toggle the terminal. I chose
That does the trick for me, one little thing when using the terminal is the use of
^→ to navigate in the cli, those combination of keys are eaten by macos… I chose to remove them :
- head to macOS System Preferences.
- Select the Keyboard and then the Shortcuts tab
- Select Mission Control on the left pane
- Disable Move left a space and move right a space
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.
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
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