How To Make Your Boring macOS Terminal Amazing With Alacritty

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I recently switched from iterm 2 to alacrity for a minimal and fast terminal setup on my Mac though iterm 2 is great there's a lot of features that it has that I don't actually use and I really like how fast and simple El laity is and that it's also crossplatform so you can also use it on a Linux machine in this video I'm going to show you guys how to set it up to take the terminal on your Mac from this to this so the first thing I'm going to do is open up the default Mac terminal I'm going to use command space and look for terminal and press enter for this setup I'm going to be using zsh you can check if you're using zsh by doing Echo and dollar sign zero this is the current default for Mac OS now the first thing you're going to want to do is to install the home RW package manager which we'll be using to install everything that we need for the setup you can run the following command to install home brew you can find this command as well as everything else I'm going to be showing you and the blog post Linked In the description and then wait until Homebrew finishes installing now you also need to add Homebrew to your path to do this you can run the following command this will add the necessary line to C profile and then you can do Source till the sl. Z profile and now you can check if you can use home brew by doing Brew D- verion awesome now the next thing we're going to do is to install alacrity to do this you can do Brew install d-c alacrity and then I'm going to open up alacrity with command space and look for alacrity now if you get this error click on okay then do command space look for security and privacy then go down and over here it says elac was blocked click on open anyway and then click on open perfect now we'll install git to do that you can do Brew install git and then we're going to install a nerd font so that we can get some really nice icons to show up in the terminal you can do Brew tap home brew slask D fonts and then do Brew install font meslo LG nerd font this will go ahead and install mes nerd font which is the nerd font that personally use then we're going to create a directory to configure alacrity we're going to do make d-p Tilla slash. config alacrity then we're going to CD into this directory like so and then I'm going to create a file by doing touch alacrity dotl this is where we can set up all of the options and I'm going to open up the config file with my editor of choice I like to use neovim so I'm going to do envm alacrity dotl you could also open it up with text edit by doing open- a and the name of the application text edit and.mo or if you have vs code installed you can do code alacrity Doo and that'll open it up in vs code all right I'm going to open it up with neovim like so and then the first thing I'm going to do is to make changes to the window to do this you can add a table called window and inside add padding dox to set padding in the left and right edges I'm going to set this to 10 and then do do y and set it to 10 as well for the top and bottom if you save this alacrity will automatically reload I'm also going to change the decorations option to buttonless like so I've saved this but to see this change we have to restart alacrity you can also change the opacity by doing something like this setting opacity to 0.8 for example I save this if I exit out of neovim you can see that better I'm going to open it back up like so you can also add some blur by setting blur to true and then save this I close neovim you'll see now that the terminal has some transparency as well as has some background blur I'm going to go ahead and close alacrity now I've opened it up again and you'll see that the buttonless option removes the buttons on the top of the window for a more minimal look I'm going to go back Toc config alacrity and open el. toml again the next thing I want to do is to set option as alt and we can set this to both so that both of my option Keys act as alt keys within alacrity this is useful for keyboard shortcuts inside the terminal then the next thing I'm going to do is add a new table called font and in here I'm going to do normal. family to set the font to the nerd font that we installed this is going to be meslo LGS nerd font mono and you can also set the size here to something like 19 for example and I'm going to save you'll see now that in my neovim window some of these symbols that weren't showing up because I didn't have the right font are now working properly now I use t-mo to manage my terminal sessions and work with panes and windows and for colors to work properly with it I need to go to the top here I'm going to add another table called NV for environment variables and I'm going to set term equal to xterm 256 color and save now I can close this and the next thing I'm going to do is to install my theme for lacity I'm going to be using power level 10K I'm going to do Brew install power level 10K I used to set all this up with om my zsh H but it's honestly overkill for what I need and it can slow down the terminal so I'm going to do all of the setup manually to keep it pretty simple and minimal now I'm going to run the following command this will add a line to CSH HRC to set up power level 10K as your theme and then we can reload this file by doing Source till the sl. CSH HRC and that will open up the power level 10K configuration wizard now I can answer y for yes this looks like a diamond y again why again why again everything looks good and now you can choose the style that you are going to want to use I've lately been using the lean style so I'm going to do one I'm going to go for Unicode which is one for the colors I'm going to do two for eight colors I do want to show the current time in 12h hour format so one I'm going to do two lines I like dotted so two left frame so two black for the frame color this will look better in a little bit two for sparse and two for many icons one for concise and I don't really want the transient prompts I'm going to do n for no and do one for ver both finally for the last question answer y for yes and Y for Yes again awesome so everything's looking pretty cool if you ever want to open up the configuration wizard for power level 10K manually you can do p10k configure and press enter and then go through it I'm going to do Q to quit this now I'm going to show you guys how to set up the colors for your power level 10K theme we're going to clone a GitHub repository that has a bunch of different elocity themes by doing git clone this is the repository I'm going to go under code and copy this URL and then paste it in here and I want the directory on my computer to be called themes now if I do a l you'll see that we have a themes directory and now I've put together my own theme for elac that is inspired from my iterm 2 theme called cool night to add it to the themes folder you can run the following command again you can find this in the blog post now again I'm going to open up the alacrity dotal file and then to the top I'm going to add an import key equal to an array and in here we're going to do T.C config SL alacrity SL themes SL themes again and then you can specify which theme you want to use you can head over to the repository to see an example of the colors here for each of the different themes I'm just going to go ahead and use mine it's called cool night I'm going to save this and now the theme has been applied I'm going to close neovim so you guys can see it now you'll notice if you use the rainbow configuration for power level 10K the background color for the directory you're currently in doesn't look very good what I recommend you do is open up till the. P10 k. zsh I'm opening it up with neovim use the editor you prefer and then look for 9 Kore Dore background and then you're going to change this variable here to zero so that it uses the black color in your color scheme and then I'm going to close neovim and then you can do Source till the sl. P10 k. zsh there you go I think that looks a lot nicer now the next thing I'm going to do is set up completion there's two different things I want to do here the first thing is to set up better completion when you're using the up and down arrow keys to go through the history to do this I'm going to do envm till the sl. zshrc to open up the zshrc file with neovim and then at the bottom I'm going to add the following this will set up a file where zsh will store our history and this will set up some options for how zsh will go about saving the history to that file now I'm going to save this close neovim and then what I recommend you do is to do cat- V and press enter to see the codes that the terminal sends when you press on a given key press on your up arrow and then your down arrow so these are the two that you need let's do c control see just going to copy these and open up the Z as HRC file again go to the bottom I'm just going to paste these in and then you can do bind key and I'm going to take the first one and use that this is the up Arrow it's going to be history search backward and then take the other one and do find key paste that and do history search forward I'm going to save this and then close this file and I'm going to reload the configuration by doing Source till the slash. zshrc now for example if I do enm and then use the up Arrow it'll go through the commands that I used previously when I used envm if I use the down arrow it'll go backwards now I also want to install zsh auto suggestions which is a really nice plugin as well we can do Brew install CSH Das Auto suggest questions now you can run the following command which you'll find in the blog post to add the line that we need to zshrc to enable this and then do Source till sl. zshrc let's do s o for example I'm going to get a suggestion to Source zsh HRC and to accept it you can use the right arrow now I also want to add zsh syntax highlighting which is a nice way to highlight your your commands we're going to do Brew install zsh syntax Das highlighting and then run the following command which you can also find in the blog post to add the line that we need in zshrc now again reload the configuration with Source till the sl. zshrc and now for example if I start typing out Source it'll start out red but once I get to Source it turns green because now the command is correct now there's some other really cool tools that I've been using lately with my terminal I made a whole video on this recently which I'll have Linked In the description right now I'm just going to install two of the ones that I showed in that other video the first is called eza it's a better Ls I'm going to do Brew install eza and then I'm going to open up the zsh HRC file with Neil VM go to the bottom and I'm going to add the following line to set up an alias for LS with a bunch of different options here you can copy this from my blog post I'm going to save and quit and reload the configuration like so and now if I do LS it has some pretty nice highlighting and the other tool I'm going to install is a better CD called zide I'm going to do Brew install zide again open up the Z as HRC file like so go to the bottom and I'm going to add the following two lines this will set up an alias for CD to use zide instead and this will help us enable and set up zide let's save and quit again reload our configuration like so and now I can use CD with the better zide functionality if I move over to a given directory for example I have the repository for my blog this is located in Tilda slev SL youtube/ spelt kit dblog now that I've gone to this directory zide will remember this and if I move somewhere else let's say I go to my home directory with CD and enter now if I just type out a portion of the name of the directory I want to go to let's say I do CD spelt and press enter with zide it will automatically go back to the directory I visited it's really awesome so you guys can see a better example of the better highlighting with eza let's do LS here and this is how it'll look like now finally as I mentioned I use t-x for all of my windows and panes I'm going to install it by doing Brew install t-o and I have a full video on how I set up and use t-o I'll have that Linked In the description for this video I'm just going to download my t-o configuration using curl I'm going to use the following command and the configuration is going to be located in my home directory and it's called tmo.com I'm going to press enter now for True Colors to work in neovim we need the term environment barrial to be correct I'm going to do Echo dollar sign term it shouldn't be aity we already fixed this but we need to close aity now I'm going to do Echo dollar sign term that's correct now now I'm going to start t-o by doing t-o and press enter and now in my setup I can do crl a and capital I this will install all of the plugins that I'm using with t-o if the status line isn't working properly you might need to get a newer version of bash you can do this with Brew install bash and then do contrl A and R to reload the t-mo configuration with my setup you can do crl a and pipe to create a vertical split control a and dash to create a horizontal split and you can do crl H to go to the left crl L to go to the right crl K to go up and controll J to go down again to dive a lot deeper into how to use t-o check out my dedicated video on that all right you guys that's it for this video if you're interested in taking this to the next level check out this video that I made recently on how to set up seven amazing command line tools that are really helpful when working on the terminal if you enjoyed the video don't forget to leave a like down below let me know in the comment section if you have any questions or feedback for me and don't forget to subscribe to the channel and click on the Bell to stay up to date with more content like this from me see you guys in the next one peace
Info
Channel: Josean Martinez
Views: 89,744
Rating: undefined out of 5
Keywords: cli, command line, terminal setup, macOs terminal, Mac Terminal, alacritty, customize mac terminal, powerlevel10k mac, mac terminal, zsh, terminal customization, macos terminal, minimal, awesome, amazing, fast terminal
Id: uOnL4fEnldA
Channel Id: undefined
Length: 16min 33sec (993 seconds)
Published: Fri May 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.