When I first began using my terminal it looked like this Basic Terminal And now, it looks LIKE THIS: Tricked out Terminal So how do you get from one to the other, well for me it took about 2 years to learn enough but lets see if we can’t help speed that up for YOU! 😎 Step 1: Ditch Bash and Use ZSH + Oh-My-ZSH First, some terminalogy — bwhahaha get it TERMINALogy!! *wipes tear from eye* 😂 Ok, maybe thats it for the terrible puns So you have your terminal application. This is the default terminal app on mac/linux/windows or iTerm2 or powershell etc. ( though). You should definitely be using iTerm2 Then you have the shell which is the thing running in the application. There are a bunch of these Bash (stands for Bourne Again Shell) ZSH (Z-Shell) C-Shell Fish etc etc They all work a little differently or support different features. ZSH is super easy to customize though which is why we’ll be using it. If you have a mac you can or for linux if neither work/for more info brew install zsh sudo apt-get install zsh check here for more methods to install. Now all you need to do is set it as your default shell with this command . stands for, you guessed it change shell, -s tells the command that you want to change it to a specific shell which you pass in as an argument which here is zsh. You’ll be asked for your computer password too. chsh -s zsh chsh Step 2: Install Oh-My-ZSH Install instructions here: https://github.com/robbyrussell/oh-my-zsh#via-curl Congrats, Two steps done!! See how easy this is. Step 3: Getting the Right Fonts You’ll want to check out this repo: which contains a ton of fonts which support all the awesome, cool symbols you’ll want to use. Its a lot of fonts to install so be sure you don’t run this while your connectivity might drop or if you’re in a rush. https://github.com/ryanoasis/nerd-fonts#font-installation Nerdfont fonts support font-awesome glyphs, material design icons, octicons and more. Nerdfont source fonts diagram If you just want to get one, I’m using and its worked great. Just click the link, download the ttf file and install the font to your computer. If you see the box with a question mark in it a times, it means the font you are using in your terminal doesn’t support that character. this is the font Unsupported character symbol Step 4: Themes and Colors You have two things to focus on when customizing your terminal. The first is the theme. This is the way the terminal is going to look. The second is the colors of those things. This determines what shade of blue is your blue, what red is your red etc. First lets talk themes. To get started take a look at https://github.com/robbyrussell/oh-my-zsh/wiki/themes All of these are baked into oh-my-zsh and all you have to do is edit your .zshrc file (its located at ~/.zshrc) and set , so for example, and thats it. ZSH_THEME="THEME_NAME" ZSH_THEME="agnoster" Example of iTerm2 Color Scheme called Broadcast As for colors, you can which has a bunch of nice color schemes ready to download for iTerm2. The colors can be edited in the settings. Go to settings > profiles > colors. In the bottom right corner is the color presets list. Click this and you’ll see an option to import a color scheme or select some built in ones. Import any of the color schemes you download from that repo. take a look at this repo Step 5: Powerlevel 9K Another awesome repo I recently found is . It serves the same purpose as the themes in oh-my-zsh. PowerLevel 9K To install PowerLevel 9k check here for instructions to see all the cool stuff other people have built. Find one you like and copy their settings into your file and then you can modify bits and pieces until its just how you like. I’d do this first before you try and build your own from scratch. Your mileage may vary with some of them. But once you find one you like you can modify any of the variables until its just how you like it. And then check out this page .zshrc (Some of the configs might include and . If you already have them in your delete the duplicate and if you’re setting the first option make sure its set before is.) POWERLEVEL9K_MODE="SOMETHING_HERE" ZSH_THEME="powerlevel9k/powerlevel9k" .zshrc ZSH_THEME Step 6: Writing Your Own Functions Powerlevel 9K supports a lot out of the box including github status/other version control systems, current working directory, host, node version, time/date, . and tons more You can also write your own functions to display more stuff. Below is the function I have to show if I’m connected to the internet. If so I display the symbol in green. Otherwise in red. You can write any bash function and have it a statement at the end . Then to include it in the prompt add (or whatever your function is called) and whatever the function ’s will appear! echo custom_internet_signal echo Note: this function is stored in . .zshrc Note 2: is saying display this unicode character. To actually know what character that is google . \uXXXX u+XXXX unicode character You can write functions to show your battery level (different icons for different statuses, different colors for different levels etc). The song playing on Spotify etc (this might take some work but check out or ), Docker status etc. https://github.com/hnarayanan/shpotify https://github.com/johnelse/spotify-cli And thats it! 6 steps to trick out your terminal! Feel free to fork or clone it (I wouldn’t use the install script though to replicate everything, its fairly buggy and is not up to date). As always if you want to take a look at my dotfiles for reference here it is.
Share Your Thoughts