-
-
Save kevin-smets/8568070 to your computer and use it in GitHub Desktop.
brew install --cask iterm2
Or, if you do not have homebrew (you should ;)): Download and install iTerm2
iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.
Get the iTerm color settings
- Solarized Dark theme (patched version to fix the bright black value)
- Solarized Light theme
- More themes @ iterm2colorschemes
Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm → preferences → profiles → colors → load presets. You can create a different profile other than Default
if you wish to do so.
More info here: https://github.com/robbyrussell/oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
When the installation is done, edit ~/.zshrc
and set ZSH_THEME="agnoster"
for the default look. Or better yet, go for Powerlevel10k.
Why Powerlevel10k? Well, because it's a drop-in replacement for Powerlevel9k, just a lot faster to render your prompt. ls
feels fast again!
So if you prefer the Powerlevel10k look with added info such as exit codes and timestamps on the right, run:
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
Then edit your ~/.zshrc
and set ZSH_THEME="powerlevel10k/powerlevel10k"
. Once you do so, when you start a new terminal session, the Powerlevel10 configure wizard will be launched to set your prompt, beware, there are many many options!
Powerlevel10k offers a whole lot more and is extremely configurable, best is to check its project page.
If you want to trigger the configuration wizard immediately, simply run p10k configure
to discover all options, which are plentiful.
If you did not go with Powerlevel10k or you want another font, read on:
- Source Code Pro
- Source Code Pro + Font Awesome, this one is needed if you want the icons from Font Awesome as shown in the screenshot for Powerlevel10k.
- Others @ powerline fonts
Open the downloaded font and press "Install Font".
Set this font in iTerm2 (iTerm → Preferences → Profiles → Text → Font), in the dropdown select the desired Font. You will see it change on the fly.
Restart iTerm2 for all changes to take effect.
Things like
- auto suggestions
- word jumping with arrow keys / natural text editing
- syntax highlighting
- visual studio code config
can be found in the section below.
Just follow these steps: https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
If the auto suggestions do not appear to show, it could be a problem with your color scheme. Under "iTerm → Preferences → Profiles → Colors tab", check the value of Black Bright, that is the color your auto suggestions will have. It will be displayed on top of the Background color. If there is not enough contrast between the two, you won't see the suggestions even if they're actually there..
By default, word jumps (option + → or ←) and word deletions (option + backspace) do not work. To enable these, go to "iTerm → Preferences → Profiles → Keys → Key mappings → Presets... → Natural Text Editing → Boom! Head explodes"
Clone the repository:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Activate the plugin in ~/.zshrc
:
plugins=( [plugins...] zsh-syntax-highlighting)
Restart iTerm2 for all changes to take effect.
Installing a patched font will mess up the integrated terminal in VS Code unless you use the proper settings. You'll need to go to settings (CMD + ,) and add or edit the following values:
- for Source Code Pro + Font Awesome:
"terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'"
. The single quotes are important! Restart VS Code after the config change. - for Source Code Pro:
"terminal.integrated.fontFamily": "Source Code Pro for Powerline"
- for Meslo:
"terminal.integrated.fontFamily": "Meslo LG M for Powerline"
- for other fonts you'll need to check the font name in Font Book. You can right click on them on select "Show in Finder" to get the exact name.
You can also set the fontsize e.g.: "terminal.integrated.fontSize": 14
Is there any way I can edit the text displaying before the prompt?
I used to have a export PS1="%n@%d $ "
defined in my old .zshrc
. Any tips on how to get the same display text using oh-my-zsh??
@jbantony Remove any line from .zshrc
that mentions "p10k", "powerlevel10k" or "ZSH_THEME". Then add PS1='%n@%d $ '
(without the export
).
You cannot install iTerm2 on Windows.
getting this error
➜ ~
iconv: conversion from -t unsupported
iconv: try 'iconv -l' to get the list of supported encodings
Error converting string from to UTF-8
➜ ~
iconv: conversion from -t unsupported
iconv: try 'iconv -l' to get the list of supported encodings
Error converting string from to UTF-8
➜ ~
@Gbolahan284 : It is for MacOS
yes. for MacOS
Hello, I found some update before and my terminal just like on the screenshot.
Why its like "⇣4 +5 !3 ?50" ? Before update, its normal.
@dante4rt, can you share your setup for the prompt?
Why its like "⇣4 +5 !3 ?50" ? Before update, its normal.
@dante4rt See https://github.com/romkatv/powerlevel10k#what-do-different-symbols-in-git-status-mean
@BaloneyBoy97 That's normal. ls
prints files in columns. Try running it in a directory with more files to see it.
This is dope, thanks a lot. Just FYI, I had an issue with setting up the fontFamily for VS Code, it kept breaking but eventually added this "MesloLGS NF" and downloaded the font files manually as cause some of them did not load. And it worked without even reloading the app.
I saw it in the the powerlevel10K repo Also has links to fonts
@wcpoon Run p10k configure
and select UNICODE instead of ASCII. If you don't see this option, check https://github.com/romkatv/powerlevel10k/tree/master#some-prompt-styles-are-missing-from-the-configuration-wizard
Wow, that's solid man. I love Powerlevel10k so much already after 10mins of using it. ❤️
hey bros please send same theme for windows computers
because this theme is very different for windows system.
@Prrromanssss The GitHub logo is displayed when you are on a branch with a remote on github.com. In your git repository the branch "main" either does not have a remote or it's not on github.com.
@romkatv
Oh, I got it, thanks!!!
I successfully installed self-suggestion, but it recommends letter by letter, not word suggestion.
I use WebStorm and the icons are not showing. How do I fix it? Many Thanks
You need to download font and apply terminal font.
Hi,
Any ideas how to completely uninstall iterm2 on a macbook pro.Already tried moving from applications to trash and emptying trash + restarting but it appears some residual settings still there.Require a brand new clean install.
@Chris7V , I believe there are settings for iTerm2 stored somewhere in /Library on the Mac, per my apple support person. I had to reinstall iterm2 yesterday and all my settings were magically there. That directory is locked to me so I can't investigate further.
In the screenshots "Desktop" and "OneDrive" are symbolic links, but the rest is my local home, so everything should be accessible.