Given I'm using the completely overpowered "caskaydiacove nf" Nerd Font Variant of the lovely Cascadia Code font, I've got all the icons I need ready to go!
I just install. (I'm using PowerShell 7 from the Windows Store, but remember PowerShell is cross platform):
And then add one line to my $profile (edit with "code $profile"):
Import-Module -Name Terminal-Icons
Now look at a directory, use dir, ls, or get-childitem, it doesn't matter...AND BEHOLD:
Thanks Brandon and Kayla! Great stuff! What customizations have YOU made?
Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
I love the Windows Terminal, but right now I launch the Terminal, then I pick a Shell (PowerShell, CMD, bash, etc) from the menu. Sometimes I want to be "shell-first."
I'll hit the Start Menu, type cmd, and then the older console/terminal starts up. I have to remember to run Terminal THEN run cmd. So I said to myself, "self, what's a good way to fix that?"
When you press Start and start typing (which is different from WinKey+R and running a .exe directly) you're looking at Shortcuts/LNK files. You can make your own and change existing ones.
Press Start, type "Command Prompt" or "PowerShell" and then RIGHT CLICK the icon and Open File Location.
For example, Command Prompt was here on my machine:
In this case, it's Command Prompt. I also renamed my LNK file to Command Prompt (Terminal) but that's optional.
I can do the same thing for PowerShell. I've moved to open source PowerShell 7 (based on .NET Core) that I installed from the Windows Store. Some store apps don't want you to change their icons so I just changed another. You can also make your own with right-click, New Shortcut.
I even did this with the Visual Studio 2019 Developer Prompt by first making a Profile for it in my Terminal settings:
and then changing the icon to call it with wt.exe and the named profile. This can also work with Cygwin, Yori, Ubuntu, or any other shell.
A few minutes and a few shortcut changes later, now I can hit start, type PowerShell, command, cmd, whatever, and it'll all load in Windows Terminal!
Since this technique works only with lnk files that the Start Menu consumes, it also works with PowerToys Run (which is like Quicksilver or Spotlight on Mac)!
Hope this helps!
Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
I thought I knew everything about the open source Windows Terminal and then I hit Ctrl+Shift+P like I do in VS Code (muscle memory) and it pops up a lovely Command Palette. You can search for any command and see the current keybinding. Super useful if you haven't yet discovered Window Panes. You can also type new wt.exe command lines and affect the current window.
NOTE: Don't forget, "wt" is an alias for the Windows Terminal, so you can Win+R and type wt and run it!
Since the wt.exe allows for chained commands, I can create a custom command in settings that calls wt.exe with chained commands/actions and bingo, I have a command called Development that opens multiple profiles, splits the screen and sets me up for Windows+Linux development in a single move!
Here I have a new command called Development that calls wt with a new-tab with a named profile, then a split-pane with another named profile.
Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
Muscle memory is a heck of a thing. When I want to build code I type Ctrl-Shift-B. I can't not. It's built into my hands! Ctrl-Shift-T is test (even though it's non-standard, it's there, in my hands.
I spend a lot of time at the command line, in Windows Terminal, in PowerShell, using PSReadLine. So why not make a few of these intuitive hotkeys work for me there as well?
PSReadLine supports Set-PSReadLineKeyHandler which is basically hotkey bindings to any arbitrary script block.
Here's Shift-Ctrl-B typing dotnet build and pressing enter. Just add these to your $profile, after you've imported PSReadLine via
if ($host.Name -eq 'ConsoleHost') { Import-Module PSReadLine }
Here's Shift-Ctrl-T typing dotnet test and pressing enter.
Set-PSReadLineKeyHandler -Key Ctrl+Shift+t ` -BriefDescription TestCurrentDirectory ` -LongDescription "dotnet Test the current directory" ` -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine() [Microsoft.PowerShell.PSConsoleReadLine]::Insert("dotnet test") [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine() }
Here's it in Animated Gif Form! (Using Carnac to see the hotkeys being pressed)
Since I am using Ctrl+Shift+T for testing (that's just me) I did need to manually unbind it from New Tab in my Windows Terminal settings. Just be aware.
{ "command": "unbound", "keys": "shift+ctrl+T" },
Sweet. What hotkeys will YOU hook up?
Sponsor: Have what it takes to code securely? Select from dozens of complimentary interactive challenges in Veracode Security Labs, test your skills, and earn a badge. Learn more.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
Every 6 or 7 years I get a new PC. My most recent one was in 2018 and I'm happily still using it today. However, I have made a few modest and somewhat low-cost (and one high-cost) upgrades. Each of these upgrades means I'll get another 3 to 5 lovely years out of this desktop machine. I'll be using Amazon referral links below, and you are supporting my writing when you use them, thanks!
The #1 thing I'm thankful for is that the ASUS ROG Strix X299-E Gaming II ATX Gaming Motherboard (Intel X299) I purchased three years ago was such a solid choice. It has/had ample memory slots, two (the new one has 3!) m.2 hard drive slots, and it's a large size for future video cards. I'm putting upgrades into this motherboard that didn't exist when I purchased it and it's doing great. If you can, always stretch the budget for a roomy motherboard - you can save up for the upgrades over the coming years like I did.
These are the upgrades I've made over the last year.
New SSD - Low Cost and High Availability
Upgrading your hard drive is a huge benefit and relatively inexpensive upgrade. I originally had a Western Digital Black 512GB SSD using an m.2 interface. This was my first "hard drive that doesn't look like a hard drive," and I still find m.2 drives to be basically impossibly amazing.
I noticed that my Drive Health, per CrystalDiskInfo was in the low 60%s and the ATTO Benchmark was getting weak on the writes.
I upgraded to a Samsung 970 EVO Plus SSD m.2 NVMe for just $165. This drive is double my original's space and nearly 3-4x the perf in some places. Plus, the Samsung Drive Migration software just worked. I literally added this drive to my second m.2 slot, ran the migration, shut down, moved the drive to the first m.2 and removed the old drive, and rebooted. I didn't get a single complaint from Windows.
This is NOT a sponsored post. This product and technique just worked and I'm thrilled. You may also be able to get a similar result from Clonezilla and another drive, but I was very much impressed with Samsung and this upgrade.
Here's the before and after benchmark between the 2018 WDC m.2 SSD and the new Samsung EVO Plus SSD.
Before:
After:
Comparing this drive to my D: and E: spinning rust (regular) hard drives is the difference between shooting a bullet and throwing it. This SSD is 10x faster than a regular drive.
Memory - Medium Cost and High Availability
I had 32 gigs of RAM since 2018 but randomly (I know, this is silly) while cleaning my PC noticed I had four memory slots unused. I *did* know this when I bought it but I just flaked or forgot I had the extra space.
While upgrading, I also noticed (with help from Twitter) that I wasn't running the XMP memory profile and running these at 3200Mhz. I was running them at 2133Mhz all this time! Doh. So a nice upgrade and one small switch in the BIOS and I've got 64 gigs PLUS I'm clocking nearly 50% faster.
This has improve performance for me when running Docker and Kubernetes locally along site, Teams, VS, VS Code, Outlook, you know the drill. I usually sit around 35-50 gigs committed when really working with everything open. The extra headroom has been great.
High Cost and Low Availability
And finally, as of the time of this writing, this is one that requires more money and more luck. I used an online bot to look for stock drops of the new NVidia 3080 video cards and got one near Christmas. I've also heard good things about the waiting list at Evga.com.
This card was $699 which was a significant outlay and I went back and forth on it before I decided to go for it. It's proven to be a great upgrade, particularly as an upgrade for video rendering for my YouTube as Adobe Premiere uses it a lot.
I really hope that this card and the more affordable 3060 are more available soon because it's a lovely upgrade.
Take a look at your desktop motherboard and consider your possible upgrades based on cost, availability, and performance and see what you could put together at a reasonable budget! Hope this helps!
Sponsor: Have what it takes to code securely? Select from dozens of complimentary interactive challenges in Veracode Security Labs, test your skills, and earn a badge. Learn more.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.