Why BUIDL on INJECTIVE Ecosystem.

Injective Protocol is a revolutionary platform that aims to bring decentralized finance (DeFi) to the next level. With its advanced technology and innovative approach, Injective Protocol is already…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




A Better Terminal

A little time spent, saves a lot of time lost.

So many engineers and scientist spend a good chunk of their time working inside of a terminal, it’s a real shame that their workspace ends up looking something like this:

WOW! much boring. very sad.

Is this the best we can do? Of course not! With a little elbow grease we can do some pretty magical things with this drab bit of screen real-estate.

With our new terminal installed we gain a lot cool super powers, such as the ability to open multiple window panes!

all your panes are belong to us!

Use zsh! From MacOS Catalina onward, Mac uses Zsh as the default shell. If you are using bash and want to switch over to Zsh you can run this command in your terminal: chsh -s /bin/zsh To check which shell you are currently using, you can echo the shell name with echo $0

The reason for switching to zsh is fairly minor, mainly it is to make customizing our terminal a tad bit easier. If you stick with bash that is completely fine; though some of the following steps will be different on your
setup, or won’t be applicable at all.

Oh My Zsh is an open-source framework for the Zsh shell. It comes with loads of plugins, helper functions, helpers, and themes! To install run this command in your terminal:

Now that it is installed you can reset iTerm2 and you will now be using
Oh My Zsh.

Well, that was a lot of work only for our terminal to look exactly the same…
So let’s add some color!

Ok, not that much color…
But we will add some. If you open your iTerm2 profiles window with ⌘-O and click on “Edit Profiles”

Then in the bottom left hand side of the window you can click on the + symbol to add a new profile.

If you then navigate over to the colors tab you will see a whole menu where you can change colors to your heart’s content! But that’s WAAAYYYY too much work for us isn’t it? So let’s do things the easy way, shall we?

I’m using the gruvebox-dark theme for those interested

Say, our terminal is looking a bit better now isn’t it? Well we aren’t finished
yet pal! One of the great things about Oh My Zsh is it comes bundled with tons of awesome themes. Let’s take a look at them all

I’m going to change mine to a theme called ‘norm’ and restart iTerm2. Let’s see what happens…

As you can see this changed my prompt, but in addition it also changed some of the functionality of my zsh setup. I won’t go into detail here about what each theme does in particular, however every theme behaves slightly differently. Some even can show your laptops battery level!

In addition to themes, you can also change the prompt of any given theme.
If you want to change a themes prompt this Stack Overflow answer is very helpful:

Another great feature of Oh My Zsh is all the bundled plugins that make using your terminal a whole lot easier. Using the bundled plugins is a breeze, just open up your .zshrc file and add any plugin you want here.

The possibilities for editing your zsh setup are endless. You can create alias’s for any command; For example, I came from a windows command prompt background so to clear my screen I would use the ‘cls’ command, but in MacOs the command is ‘clear’, that’s a whole two characters longer; This is UNACCEPTABLE!

As much as I talk about how you should change your terminal and use zsh and yada yada.. The terminal is yours. No company will likely ever require you to customize your terminal in a way they see fit or add certain alias’s. If you wish to keep the base terminal setup that is perfectly fine, and you won’t be shamed (probably) for using any particular setup.

When all is said and done this is what my terminal ends up looking like

My prompt uses a heart symbol when all is well and changes to an X when things have gone horribly wrong. On the right hand side is information about my current git repository. The colors in my prompt are time dependent, so as the day progresses it goes from a light of-white color to this darker theme.

Add a comment

Related posts:

Opening Time of Top Fast Food Breakfast Chains

The breakfast battle has been heating up as chains like McDonald’s, Dunkin Donuts and Taco Bell have been pushing early morning offerings as a way to attract consumers who are juggling busy schedules…

Working with Organisational Blind Spots

I was once told by a highly successful artist that ‘if to err is human, art is error’ — an interesting take on imperfection as a key to creativity. The same logic could be applied to any creative…

Where is the BAME in tech?

On 28th November 2018, Dionne Condor — Farrell, Senior Developer at Transport for London organised the second Where’s the BAME in Tech? event. Speakers included Dionne, Simi Awokoya, Ashleigh Ainsley…