selective focus photo of brown and blue hourglass on stones

This was a reasonable use of my time.

When I was a teenager, I want to say 16-17 at the time, I visited some older friends who I’d met through the local “hax0r” scene on IRC. They were local-ish, about an hour away, so I figured hey why not pay them a visit? So we packed into a friend’s minivan (we just oozed cool at the time) and headed their way. When we arrived, I was gobsmacked – to the teenage aspiring ‘hax0r’, these guys were living the dream. Super high-speed internet (I think it was 10mb at the time), computer components everywhere, and a dedicated LAN party setup that was always in use. One of the things they were super stoked about was their recent acquisition and installation of Linux, and most importantly, the window manager they were using.

Whenever they closed a window, instead of just disappearing, the window would explode and fall off the bottom of the screen. Let’s just say I was really, really impressed. Considering it’s coming up on 30 years since I saw that animation and remember it was like it was yesterday, it clearly had an effect. Obviously, these over-the-top stylistic choices aren’t realistic in an everyday scenario, but we had so much fun opening and destroying windows. (Check out the video below for an example of things that look great in theory, but in practice would become exhausting on a long enough timeline).

I think my big takeaway from the experience is that some things, minor things if we’re being honest, could be improved upon. They could just look a bit nicer, and when I came across someone using a fancied-up terminal/shell in a tutorial video, I knew I had to have it. Don’t get me wrong, PowerShell 7 is really quite nice – they did a really good job with it. It’s my go-to these days, and it’s what I have loaded as my terminal in VSCode – but it could look nicer.

It took some doing, but I think the results are absolutely worth it. Check it out:

This actually took way more effort than I thought it would, and in the process, I learned quite a bit. So, in the interest of knowledge-sharing, here’s what I discovered.

The app that makes this happen is called “Oh My Posh“. There’s another one called Starship that supposedly does the same thing, but it didn’t work (at all). Oh My Posh is in the Windows app store, or can be installed using winget.

Installing Oh My Posh wasn’t enough to make the prompt work the way I wanted, and the installation instructions weren’t super helpful so here’s the nitty-gritty. Your setup may be different from mine, and therefore mileage may vary. Use with discretion.

  1. You likely need to create a PowerShell profile if you’re using PowerShell 7 like I am. Echoing $PROFILE told me about a non-existent .ps1 profile configuration file when I tried to open it. To do this, there’s some instructions linked here, but basically, you need to run the following command in PowerShell: New-Item -Path $profile -Type File -Force
  2. Once the profile is created, you can modify it using “notepad $PROFILE” from inside the same PowerShell session
  3. The $PROFILE file needs to have the following item added as its own line: path\oh-my-posh init pwsh –config “path\themes\theme.omp.json” | Invoke-Expression
  4. For me, Oh My Posh is stashed in C:\Users\Username\AppData\Local\Programs\oh-my-posh\bin\
  5. Oh My Posh came with a number of themes – replace “theme.omp.json” with the name of the theme shown on this page. (if you want to use the same theme as me, it’s called montys)
  6. The theme will likely look like hot garbage unless a Nerd Font is installed. Download and install one from here. Personally, I’m using “CodeNewRoman Nerd Font“. (I’d never heard of Nerd Fonts before I did this and I’m super excited about this discovery)
  7. To make PowerShell use the new font, open the JSON configuration file for PowerShell. The easiest way to do this is to press ctrl+shift+, while inside PowerShell. The file should open – in my case, I had to tell it what file hander to use before it’d open.
  8. In “profiles” “defaults”, add “fontFace”: “Your Font Name Here”,
  9. Note: case matters, quotation marks matter, and your trailing comma matters. When finished, save the file
  10. The changes should appear in the open PowerShell immediately. If you mess up the JSON file, it will tell you immediately.
  11. We’re almost there. In VSCode, open the settings using Ctrl+, and search for “font family”, no quotes.
  12. Select “Terminal” and enter the name of your font in the box. You may get a warning about the monospaced font – mine seemed to work fine.
  13. Close the settings file – and you should be good to go!

Also, there’s this link/doc about PowerShell, I didn’t follow this one and didn’t see it until after I’d finished. I’m not sure that this is still maintained anyway.

Author: Greg
Middle-aged father of two - still a kid at heart! Lover of all things geeky, trivia, factoids, craft beers, and procrastination. #SnorlaxIsMySpiritAnimal. #CanadianEh! "I don't know. Fly casual."

Leave a Reply

Your email address will not be published. Required fields are marked *