Skip to content

Instantly share code, notes, and snippets.

@PierreThiollent
Last active March 26, 2024 19:14
Show Gist options
  • Star 35 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save PierreThiollent/9087a26d56e0704c263baf7e1a5f3827 to your computer and use it in GitHub Desktop.
Save PierreThiollent/9087a26d56e0704c263baf7e1a5f3827 to your computer and use it in GitHub Desktop.
iTerm2 and Oh-my-zsh config

Setup iTerm2 and oh-my-zsh

Enjoy ! 😄

Install iTerm 2

Download iTerm2 here.

Install Night Owl theme for iTerm2

  1. Download Night Owl for iTerm2.
  2. Launch iTerm2.
  3. Press Cmd+, to open preferences.
  4. Visit Profiles → [Your Profile Name] → Colors.
  5. Choose “Import…” from the “Color Presets” drop-down.
  6. Import the Night Owl.itermcolors file.
  7. Choose “Night Owl” from the Color Presets.

Install ZSH and Oh-my-ZSH

$ brew install zsh

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

Install Spaceship oh-my-zsh theme

$ git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"

$ ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Documentation for Spaceship theme here.

Install zsh-autosuggestions plugin

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

# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/pierrethiollent/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="spaceship"
# CONFIG SPACESHIP
# Symbole avant les commandes
SPACESHIP_CHAR_SYMBOL="🚀 "
# Affichage du prefixe avant le repertoire courant
SPACESHIP_PROMPT_FIRST_PREFIX_SHOW=true
# Icone avant le repertoire courant
SPACESHIP_DIR_PREFIX="🗂 "
# Icone avant la branche Git
SPACESHIP_GIT_BRANCH_PREFIX="⚡ "
SPACESHIP_PROMPT_SUFFIXES_SHOW=false
# Symbole avant la version du paquet
SPACESHIP_PROMPT_DEFAULT_PREFIX=" - "
# Desactive l'affichage du temps d'execution du script
SPACESHIP_EXEC_TIME_SHOW=false
# Prefixe avant la branche git
SPACESHIP_GIT_PREFIX=" on "
# Prefixe version de paquet
SPACESHIP_PACKAGE_PREFIX=" is "
# DEsactive git status
SPACESHIP_GIT_STATUS_SHOW="false"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git node npm github zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Set Spaceship ZSH as a prompt
#autoload -U promptinit; promptinit
#prompt spaceship
alias ys="yarn start"
alias ya="yarn add"
alias please="sudo"
alias run-ios="npx react-native run-ios"
alias sf="php ./bin/console"
{
"Ansi 2 Color" : {
"Red Component" : 0.13333334028720856,
"Color Space" : "sRGB",
"Blue Component" : 0.43137255311012268,
"Alpha Component" : 1,
"Green Component" : 0.85490196943283081
},
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.50980395078659058,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 0.66666668653488159
},
"Ansi 5 Color" : {
"Red Component" : 0.78039216995239258,
"Color Space" : "sRGB",
"Blue Component" : 0.91764706373214722,
"Alpha Component" : 1,
"Green Component" : 0.57254904508590698
},
"Use Non-ASCII Font" : false,
"Bold Color" : {
"Red Component" : 0.67843139171600342,
"Color Space" : "sRGB",
"Blue Component" : 0.40392157435417175,
"Alpha Component" : 1,
"Green Component" : 0.85882353782653809
},
"Right Option Key Sends" : 0,
"AWDS Tab Directory" : "",
"Normal Font" : "Monaco 12",
"Rows" : 30,
"Default Bookmark" : "No",
"Ansi 6 Color" : {
"Red Component" : 0.12941177189350128,
"Color Space" : "sRGB",
"Blue Component" : 0.65882354974746704,
"Alpha Component" : 1,
"Green Component" : 0.78039216995239258
},
"Custom Directory" : "Yes",
"AWDS Tab Option" : "No",
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"Non-ASCII Anti Aliased" : true,
"Use Bright Bold" : true,
"Ansi 10 Color" : {
"Red Component" : 0.13333334028720856,
"Color Space" : "sRGB",
"Blue Component" : 0.43137255311012268,
"Alpha Component" : 1,
"Green Component" : 0.85490196943283081
},
"Ambiguous Double Width" : false,
"AWDS Pane Option" : "No",
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Show Status Bar" : true,
"Ansi 15 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 1
},
"Foreground Color" : {
"Red Component" : 0.83921569585800171,
"Color Space" : "sRGB",
"Blue Component" : 0.92156863212585449,
"Alpha Component" : 1,
"Green Component" : 0.87058824300765991
},
"Working Directory" : "\/Applications\/MAMP\/www",
"Blinking Cursor" : false,
"AWDS Window Option" : "No",
"Sync Title" : false,
"Prompt Before Closing 2" : false,
"BM Growl" : true,
"Command" : "\/bin\/zsh",
"Description" : "Default",
"AWDS Pane Directory" : "",
"Disable Window Resizing" : true,
"Screen" : -1,
"Selection Color" : {
"Red Component" : 0.37254902720451355,
"Color Space" : "sRGB",
"Blue Component" : 0.59215688705444336,
"Alpha Component" : 1,
"Green Component" : 0.49411764740943909
},
"Mouse Reporting" : true,
"AWDS Window Directory" : "",
"Columns" : 120,
"Idle Code" : 0,
"Ansi 13 Color" : {
"Red Component" : 0.78039216995239258,
"Color Space" : "sRGB",
"Blue Component" : 0.91764706373214722,
"Alpha Component" : 1,
"Green Component" : 0.57254904508590698
},
"Custom Command" : "Yes",
"ASCII Anti Aliased" : true,
"Non Ascii Font" : "Monaco 12",
"Vertical Spacing" : 1,
"Use Bold Font" : true,
"Option Key Sends" : 0,
"Selected Text Color" : {
"Red Component" : 0.87274330854415894,
"Color Space" : "sRGB",
"Blue Component" : 0.93430596590042114,
"Alpha Component" : 1,
"Green Component" : 0.89671963453292847
},
"Background Color" : {
"Red Component" : 0.0039215688593685627,
"Color Space" : "sRGB",
"Blue Component" : 0.15294118225574493,
"Alpha Component" : 1,
"Green Component" : 0.086274512112140656
},
"Character Encoding" : 4,
"Ansi 11 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0.58431375026702881,
"Alpha Component" : 1,
"Green Component" : 0.92156863212585449
},
"Use Italic Font" : true,
"Unlimited Scrollback" : false,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[1;6A"
},
"0x37-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0x32-0x40000" : {
"Action" : 11,
"Text" : "0x00"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[17;2~"
},
"0xf70c-0x20000" : {
"Action" : 10,
"Text" : "[20;2~"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[1;2H"
},
"0xf72b-0x40000" : {
"Action" : 10,
"Text" : "[1;5F"
},
"0xf705-0x20000" : {
"Action" : 10,
"Text" : "[1;2Q"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[1;6C"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[1;2A"
},
"0xf701-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000" : {
"Action" : 11,
"Text" : "0x7f"
},
"0x33-0x40000" : {
"Action" : 11,
"Text" : "0x1b"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[1;2C"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[1;5B"
},
"0xf70d-0x20000" : {
"Action" : 10,
"Text" : "[21;2~"
},
"0xf702-0x260000" : {
"Action" : 10,
"Text" : "[1;6D"
},
"0xf729-0x40000" : {
"Action" : 10,
"Text" : "[1;5H"
},
"0xf706-0x20000" : {
"Action" : 10,
"Text" : "[1;2R"
},
"0x34-0x40000" : {
"Action" : 11,
"Text" : "0x1c"
},
"0xf700-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf70e-0x20000" : {
"Action" : 10,
"Text" : "[23;2~"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[1;2D"
},
"0xf703-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[1;5A"
},
"0xf707-0x20000" : {
"Action" : 10,
"Text" : "[1;2S"
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[18;2~"
},
"0x35-0x40000" : {
"Action" : 11,
"Text" : "0x1d"
},
"0xf70f-0x20000" : {
"Action" : 10,
"Text" : "[24;2~"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[1;5C"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[1;6B"
},
"0xf702-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[1;2F"
},
"0x36-0x40000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[15;2~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[1;2B"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[19;2~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[1;5D"
},
"0xf704-0x20000" : {
"Action" : 10,
"Text" : "[1;2P"
}
},
"Window Type" : 0,
"Background Image Location" : "",
"Blur" : false,
"Badge Color" : {
"Red Component" : 0.37254902720451355,
"Color Space" : "sRGB",
"Blue Component" : 0.59215688705444336,
"Alpha Component" : 1,
"Green Component" : 0.49411764740943909
},
"Scrollback Lines" : 1000,
"Send Code When Idle" : false,
"Close Sessions On End" : true,
"Terminal Type" : "xterm-256color",
"Visual Bell" : true,
"Flashing Bell" : false,
"Status Bar Layout" : {
"components" : [
{
"class" : "iTermStatusBarBatteryComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 0
}
}
},
{
"class" : "iTermStatusBarCPUUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 0
}
}
},
{
"class" : "iTermStatusBarMemoryUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 0
}
}
},
{
"class" : "iTermStatusBarClockComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"format" : "M\/dd h:mm",
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 0
}
}
},
{
"class" : "iTermStatusBarSearchFieldComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"algorithm" : 0
}
}
}
],
"advanced configuration" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 0
}
},
"Silence Bell" : false,
"Ansi 14 Color" : {
"Red Component" : 0.49803921580314636,
"Color Space" : "sRGB",
"Blue Component" : 0.7921568751335144,
"Alpha Component" : 1,
"Green Component" : 0.85882353782653809
},
"Name" : "Default",
"Cursor Text Color" : {
"Red Component" : 0.99999600648880005,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 1
},
"Shortcut" : "",
"Cursor Color" : {
"Red Component" : 0.3411764800548554,
"Color Space" : "sRGB",
"Blue Component" : 0.7265554529376459,
"Alpha Component" : 1,
"Green Component" : 0.7607843279838562
},
"Ansi 0 Color" : {
"Red Component" : 0.0039215688593685627,
"Color Space" : "sRGB",
"Blue Component" : 0.15294118225574493,
"Alpha Component" : 1,
"Green Component" : 0.086274512112140656
},
"Guid" : "56809783-BDB1-4363-A81B-678A0BA726BE",
"Horizontal Spacing" : 1,
"Link Color" : {
"Red Component" : 0.50980395078659058,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 0.66666668653488159
},
"Ansi 4 Color" : {
"Red Component" : 0.50980395078659058,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 0.66666668653488159
},
"Tab Color" : {
"Red Component" : 0.0039215688593685627,
"Color Space" : "sRGB",
"Blue Component" : 0.15294118225574493,
"Alpha Component" : 1,
"Green Component" : 0.086274512112140656
},
"Transparency" : 0,
"Ansi 7 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 1
},
"Ansi 8 Color" : {
"Red Component" : 0.34117648005485535,
"Color Space" : "sRGB",
"Blue Component" : 0.33725491166114807,
"Alpha Component" : 1,
"Green Component" : 0.33725491166114807
},
"Ansi 9 Color" : {
"Red Component" : 0.93725490570068359,
"Color Space" : "sRGB",
"Blue Component" : 0.31372550129890442,
"Alpha Component" : 1,
"Green Component" : 0.32549020648002625
},
"Ansi 1 Color" : {
"Red Component" : 0.93725490570068359,
"Color Space" : "sRGB",
"Blue Component" : 0.31372550129890442,
"Alpha Component" : 1,
"Green Component" : 0.32549020648002625
},
"Ansi 3 Color" : {
"Red Component" : 0.67843139171600342,
"Color Space" : "sRGB",
"Blue Component" : 0.40392157435417175,
"Alpha Component" : 1,
"Green Component" : 0.85882353782653809
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment