Build my Mac terminal

Installation

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Iterm2

brew cask install 1password iterm2

Change to Iterm2

Oh My zsh

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

powerlevel10k

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
p10k configure
vim ~/.zshrc

ZSH_THEME=“powerlevel10k/powerlevel10k”

Theme

mkdir ~/ZSH_file;
cd ~/ZSH_file;
git clone https://github.com/mbadolato/iTerm2-Color-Schemes;
  • iTerm2 -> Preferences (⌘ + ,)
  • Open the “Profiles” tab
  • touch “Colors”
  • touch “Color Presets…”
  • import “Tomorrow Night”

Font

brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
  • iTerm2 -> Preferences (⌘ + ,)
  • Open the ““Profiles”” tab
  • touch “Text”
  • Select “Hack Nerd Font Mono”

History option

vim ~/.zshrc

setopt INC_APPEND_HISTORY #Write to the history file immediately, not when the shell exits.

Plugins

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
vim ~/.zshrc

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

vim $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=‘fg=#00ffff,bg=cyan,bold,underline’

source ~/zshrc

Iterm2 Shortkeys

To jump between words and start/end of lines in iTerm2 follow these steps:

  • iTerm2 -> Preferences (⌘ + ,)

  • Open the “Keys” tab

  • Add the following Global Shortcut Keys

  • Move cursor one word left

  • Keyboard Combination: ⌥ + ←

  • Action: Send Hex Code

  • Code: 0x1b 0x62

  • Move cursor one word right

  • Keyboard Combination: ⌥ + →

  • Action: Send Hex Code

  • Code: 0x1b 0x66

  • Move cursor to beginning of line

  • Keyboard Combination: ⌘ + ←

  • Action: Send Hex Code

  • Code: 0x01

  • Move cursor to end of line

  • Keyboard Combination: ⌘ + →

  • Action: Send Hex Code

  • Code: 0x05

  • Delete word

  • Keyboard Combination: ⌥ + ←Delete

  • Action: Send Hex Code

  • Code: 0x1b 0x08

  • Delete line

  • Keyboard Combination: ⌘ + ←Delete

  • Action: Send Hex Code

  • Code: 0x15

  • Undo

  • Keyboard Combination: ⌘ + z

  • Action: Send Hex Code

  • Code: 0x1f

  • Don’t forget to remove the previous bindings:

  • Open the “Profiles” tab

  • Click the sub-tab ”Keys”

  • Remove the mappings for key combinations ⌥ + ← and ⌥ + →

Tools

macOS command line tools for developers

sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"

Configation

# Show Library folder:
chflags nohidden ~/Library
# Show hidden files:
defaults write com.apple.finder AppleShowAllFiles YES
# Show path bar:
defaults write com.apple.finder ShowPathbar -bool true
# Show status bar:
defaults write com.apple.finder ShowStatusBar -bool true