I’m at a newer stage of life, and no, this has nothing to do with the current, worldwide pandemic or staying at home on a daily basis now. It’s hardly that serious. It has everything to do with my computer and the plethora of PowerShell tabs I have open. More so these days, it’s actually the elevated number of Windows Terminal instances running on my single, physical laptop. Sure, I could keep everything in a single instance of Windows Terminal, but I’m a fan of using multiple desktops. For me for example, it’s “here’s my general desktop, here’s my Bitbucket repository desktop, here’s my VS Code and Git desktop, and here’s my Docker desktop.” That’s four instances of Windows Terminal, although my VS Code and Git desktop would only have a Git Bash tab in Windows Terminal. Anyway, I needed a quicker way to know which desktop I’m currently on, and since I’m often at a PowerShell prompt, I thought I should help myself out.
This took me back to my earlier days learning PowerShell. See, those things really matter. I took advantage of my knowledge of the host program’s title bar. I was already doing that, but I needed to add more to it. Anyway, here’s what you’d see by default after I opened Windows PowerShell (5.1) and PowerShell (7.0.0), and then switched back to PowerShell.
As you can see, I use the tabs to ensure I know which version of PowerShell I’m using, although it’s mostly clear anyway due to the icons, host background color, etc. So yes, I have my version as clear as can be, but that’s not really the point today. I want to know which desktop I’m on with some help from PowerShell.
≥ Tommy Maynard (Twitter: @thetommymaynard)