In-Depth Terminal Customization (WSL2 + Windows Terminal + Oh My Posh!)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] oh hey what are you guys doing here uh i i just took a little break and now you are here um oh i remember i promised you to deliver the wsl to customization video last week but i didn't so well that explains why you're here now so we might as well do it so let's go alright guys let's dive right into this as always i provide a written tutorial on cosec.com that you can open up while following through with this tutorial just head over to cosec.com and search for the article or just click in the link in the video description below to open that up since this is a three-part series now we pick up where we left off if you want to check out the other videos where we were learning how to install windows terminal with wsl2 as well as windows terminal basic customization for windows terminal where we don't go into any depths with zsh and stuff like this and this is the third part of the series where we will cover more in-depth customization using oh my posh initially i wanted to show you guys how to use all my set as h which is like our all-in-one framework or using csh but i just discovered oh my posh through a comment on an article that i've written about uh windows terminal on my blog and somebody pointed out to check out all my posh and i did check it out and i really really liked it i think it's basically a similar thing then or like oh my set is age it doesn't come with all those uh or with the installation routine that all my setters age provides but i really liked it because it's clean it's easy to install and there are a ton of themes that you can choose from and all of them look really really great so i thought why not show you guys something newer that you might have not seen yet because all my status age has been out there for quite some time and probably a lot of you have seen it already so i thought uh let's show you guys something new so in today's video we will look at modifying this terminal to something more beautiful and of course we will also install set as h status h is a different shell than bash it's in my opinion once you start using that as age there is no way back to using regular bash and i think once you start using it you will understand why things like auto suggestions and stuff like this which we will also cover in this video are just far too convenient to uh not use them so i'm definitely all the way in set as age as of now and uh yeah this is just a little uh intro to this let's get right on with that all right so as i said i recommend you to open up this article while you're following through this tutorial simply because you can go ahead and you can copy and paste the commands and the syntax that i'm going to use throughout this video now let's get right started with that so the first part is install zh on wsl 2. this is a vanilla ubuntu 2004 installation that i just spun up it just looks like this with the translucent background and stuff like this um because i set my windows terminal up to use that per default and this is actually where we stopped the last video so we can pick right off there okay so the first thing obviously is uh sudo apt update and actually let's follow through with my own tutorial so we can see that it's actually working right so we do a little copy of pasting here uh we're gonna paste it in there then we enter the password of course and make sure that our repository is up to date then we go and do install z so we do sudo apt install set as h minus y to save us a additional click and then we have that installed the next thing we are going to do is we are going to make setus h the default shell and uh let's do that there we go requires another password entering and once we have done that and we actually restart our shell and i just do that by closing this one and reopening it that should do it then we will end up in this selection where we can choose from a couple of options here and as i have written in the article you go for option two which is the default option which creates a default z or zhrc config file that we will need to use in a second a clear screen here and i cd into our main directory to continue on so the next thing is installing oh my posh and you can go to the oh my posh website and follow through with their installation routine but i've written it down for you here so you can just as well copy and paste it right from here it's exactly the same that they have on their documentation so choose whatever fits you better i'm going to copy it right out of here so we do this boom this is basically going to uh download the repository from their github and all the themes so this is downloaded and next thing we do is we give some permissions boom and the next thing we do is we install unzip because we are going to need that in a second and you can also go ahead and copy all of those commands at once but i want to go through it step by step okay time for cleaning up let's clear up the screen here and then we do some new directory that's called both themes then vw get the latest themes from their website and as you can see guys i'm doing the same that you should do i'm just copying and pasting stuff from the article and this is what i'm going to do moving forward in the future i will always provide if applicable a written article for you guys you can easily follow along with my tutorials when i'm doing the videos for them let me know how you like that approach in the comments below please next one another permissions set for those themes and then we remove the zip file right here um did we just do the right thing something just happened yeah no there we go okay uh let's make this bigger so you can actually see something there but i was just copying and pasting stuff anyway until now all right next up we need to install some fonts and they recommend those fonts they use those fonts in their theme if you go to the oh my posh website and you search for fonts by the way i really like this kind of website where this is like the tailwind documentation all of this i think it's github pages actually i'm not sure but that you can just search stuff and you're directly there so this is really cool um it says here oh my posh was designed to use nerd fonts so and they specifically use or they recommend the mislow lgm nf font and once you click on this link you download the zip file i provided the link for you here of course this is the link to nerd fonts and this is the link to the mislow font thingy and then you just simply open up uh this file and unzip it and install it i'm going to show you how by the way i just installed windows 11 yesterday and i'm blown away by how beautiful it is and how fast it is compared to windows 10 so let's just take a second here and appreciate how much effort microsoft put into making windows 11 more beautiful and we have all those rounded edges here like on mac really like that just a quick side note okay then you click into the uh folder once you have it downloaded you just right click and you do unzip somewhere extract all here i did not even install any other 7zip or something then you click in there and what i did is just i i selected all with control a and then i right click and click install it's installing all the me slow lg or whatever that font name is and it installs it right into your system and then you have that available to you now the next thing you need to do is we need to set this font to be used in our uh windows terminal so we do that by clicking on the settings thing here and then we select the appropriate ubuntu distribution so make sure you select the right one down here you can also go ahead and change that in the default profile but for now we are going to use uh this one down here all right then we go i think it's appearance yes it is appearance and here you can double check the settings that i'm using i'm using the tango dark color scheme or yeah it's a color scheme right and then we change the font face and uh you have to click on show all fonts down below here and then you select the appropriate font so i'm using the mislo lgm nerd font as you can see i used it per default already so i have it set up everywhere if you want to do this acrylic thing i explained it in the previous tutorials but just in case you didn't do them you know you can set the cursor to vintage to have it looking exactly like i have it and the important part then is to enable acrylic and set the acrylic opacity to zero percent and then you click on save and once we click on save we have the me slow fonts set up for that okay you can also obviously choose any other kind of font that is supported with that if you don't like this one there are plethora of fonts as a choice as you can see there uh let's see where we are in the tutorial i think yeah that's that's the part with the fonts so i i explained it here too and then we are going to activate all my posh okay to do that we need to use nano so we do nano uh squiggly thing forward slash points set us h rc and i'm going to make it bigger again for you because i always forget and you never fail to remind me of that i'm not showing you a terminal that is sufficiently big okay and then we just uh scroll down all the way to the bottom until we reach the bottom using our arrow key and then just go ahead and copy and paste this both lines from the website right there or you just write it there manually if you will and then you just right click and that pastes it in and then you go uh where are we yeah then you go up once and then you just make a space here just to make it appropriate uh properly formatted you know and then you press ctrl o you press enter you press ctrl x to leave nano that's also written here probably a hundred times to draw this article so then uh to actually activate that we need to do source status h rc and boom we already have that oh my posh theme the default theme that is uh shown to us in the actual oh my posh tutorial we have that already activated you can see and of course now we have a little bit of a space problem going on here because that's how it's meant to be looking if you're fine with that default theme feel free to take off now but i would actually recommend you to stay until we install the zsh auto suggestions anyway because this is a really cool thing so if you do want to change the theme which is the next part in the written tutorial you can browse all the themes by copy this line of copying this line of code right into your terminal this is a simple for loop that goes through all the theme files that are in this omp json format and you just paste it in there and then boom you get all the themes and how they actually look inside of your terminal which i found pretty cool um it's a really nice thing look at this it's like a rasta jamaican thing jamaican theme looks pretty cool but let's let's follow through with this tutorial that we are on the same page there so to change the theme it's super super easy probably there is even an easier way but this is the way i do it so we do again a nano and we do status hrc and then we go again all the way down to the bottom and you probably guessed it by now but if we want to change the theme to some other theme the only thing we do is we change the name of the theme file here so in this case i think i choose the half-life theme oh this doesn't work okay so we choose the half-life theme here because mr freeman needs some appreciation so half minus minus live dot omp dot json is the only thing i change the name control o enter control x to get out of there and then we do another source and if we would have uh z auto suggestions activated already then we would have a lot of less to type now this is the thing when you change this out of some reason it doesn't work for me anymore like it's it kind of i don't know what it does but i need to go ahead and restart my windows terminal and then it's applied and we can see this nice lambda sign here from half-life and that we are in the folder it's a pretty minimal shell but it gets the point across i think okay guys i think we are already in a good spot and this is a pretty nice minimal shell so we have more space i can make the terminal even bigger for you and then let's continue on so part six is installing more themes for oh my posh i personally haven't searched for other themes out of the default themes but i'm sure there are some themes out there that you could utilize and how you would install them is very easy uh you would just cd into this uh post themes folder and in there you do an ls and you see all the themes uh let's say you would like to clone another theme from github the only thing you would do here is clone this file as an example file what i put in here that's already existing in here in fact let's rm m365 princess and let's assume it's not here and then you can just simply clone that right into this directory and if we did it do that repository oh there's some typo in there i think uh okay i have to correct that whatever it would just pull it down from the repository it would it would put it would pull it in here so i think you get the point it's really easy so you just search some other team and you get clone it unless of course it is a omp.json file that you can download or clone but you need to put that fall into this filer and that's it you could also manually go ahead and attach a 365 princess omp json or you could just use directly nano to create it it was one step extra we didn't need to have and you just paste this json data in here data json data sorry and then you save it and that would be the same outcome in the end alrighty now to the fun part let's install csh auto suggestions i explain it here what it does and stuff like this so we simply do the official instructions on how to install it which means get cloning this thing down to our system and then again we do a nano status hrc which should be somewhere here there we go and then we need to add some additional code down to the bottom and since i like to keep my things organized i commented it for you already so you need to copy that and and then again paste it in to the bottom and because we pay attention to proper formatting of our stuff we are going to give a little spacing oh that was not what i wanted [Music] there we go we put a little um space in there and then again ctrl o enter ctrl x to leave and that should work unless you restart your terminal once again as i said sometimes source is working sometimes it doesn't but if you go here ahead now and you see those are already the order suggestions showing up it already remembers basically where we have been before and it suggests us things and if we do that we can also you know get clone it would pull that up again and the more you work with status age all the suggestions the more it learns from your behavior for example i'm using a ton of like on my actual shell i do a lot of development so i cd into the same folders very often and as soon as i type cd it already suggests me where where it wants me or where it thinks i want to go and this is really useful if you do work a lot with your terminal by the way this is also all my posh it's another theme you find that in the theme selection when you go to their website so as i said guys this is at least in my opinion is really useful it's a really useful tool definitely i like to have a beautiful shell it makes it somehow more pleasant to work with the terminal i don't like to look at the freaking like a default terminal with a black background that is boring i like it more when it looks visually pleasing and of course that is age auto suggestions is a great tool that allows you to be more productive in your terminal and i've been using it ever since i started using it basically you can also go ahead and check out the oh my posh website and check out the different customizations you can still do there's a ton of things you can modify even with the default themes you can change colors from each and every element that they have in there there's a whole part on configuration on their website which i won't cover in this video because it would be ridiculously long to do that it's really easy to modify because it's all json data so you can just almost set data data again that's uh that's not good i don't want to fall into that um so yeah i think uh you get the gist of it and uh i think it's a pretty pretty awesome tool and oh my posh is great and as i said if if you really would like to have another tutorial on all my set is age just let me know and i will provide that too there are a ton of cool zh themes out there as well but this particular uh repository from oh my posh i think they have really beautiful themes that work right out of the box and i think why not use them why not try it out right um that being said i'm not sure what i'm going to do next with the wsl 2 tutorial series because we basically covered almost everything there is to know if you have any other topics you want covered in this regard let me know in the comments below don't forget to give this video a thumbs up if you enjoyed it of course and um subscribe to the channel if you haven't already because 92 of my viewers are not subscribed yet which is kind of a tragedy which also is kind of normal but whatever if you want to just hit that subscribe button and i hope to see you guys back in the next video thanks for watching until then have fun with all my posh and a very beautiful terminal [Music] [Applause] [Music] you
Info
Channel: Stefan Rows
Views: 777
Rating: undefined out of 5
Keywords: terminal customization, customize windows terminal, wsl2 customization, customize wsl2, windows terminal customization
Id: YZ9TKel8EAo
Channel Id: undefined
Length: 19min 45sec (1185 seconds)
Published: Wed Nov 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.