Windows Terminal: complete reference


Windows is the most popular PC Operating System in the world, and for good reason. Not only has Microsoft made the Operating system easy to use, but it has also blessed it with a gazillion of power-user-friendly features. Command Prompt, Windows Subsystem for Linux, and PowerShell were always good enough for advanced users. To make the whole command line programming system more streamlined, Microsoft released Windows Terminal. You can download and install the app from Microsoft Store.

Introduction

Windows Terminal is a terminal interface for command-line tools and shells, which allows users to put their favorite command-line applications under a single umbrella. It offers multi-tab support, personalized features — colored window, text formatting, and more — Unicode or UTF-8 character support, GPU-aided text rendering, and other noteworthy tools.

1. Productivity – Profiles

Windows Terminal lets you create multiple profiles for different shells. Essentially, you can configure these profiles in any way. I would cover some of the use cases to help you get started.

Steps to create new profile [more info]

  • Open the Windows Terminal application.
  • Click the drop-down button on the title bar.
  • Select the “Settings” option.
  • Click “Add new” option on the sidebar.
  • Type a name in the “Profile name” field.
  • Click the “Browse” button next to the Command Line field.
  • Select the CMD shell exe file and click “Open.”
  • Hit the “Save” button.
  • With that, you have added a new profile to the Windows Terminal.

Alternate, more advanced way is to click Open JSON file at the bottom left and edit the configuration file directly.

We would use the JSON file. Note that you might have to restart Windows Terminal to reflect changes on JSON. Each profile needs a unique GUID. You can either use the GUIDs exactly as follows or you can generate yours like following:

Generate GUID using PowerShell Core profile, showing my unique customization in Windows Terminal app

25+ Color Themes!

My code snippets would have references to these themes as an added bonus, if you would want to save countless hours creating and picking these color themes.

Subscribe to get access

Read more of this content when you subscribe today.

cmd.exe and PowerShell profiles

This probably is the most obvious one. Windows Terminal would come with this profile.

{
 "commandline": "cmd.exe",
 "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
 "hidden": false,
 "name": "Command Prompt"
},
{
 "commandline": "powershell.exe",
 "fontFace": "CaskaydiaCove NF",
 "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
 "hidden": false,
 "name": "Windows PowerShell"
}

PowerShell Core profile

PowerShell Core is a cross-platfrom (Windows, Linux and macOS) software. It has command-line shell, an associated scripting language and a framework for processing cmdlets. If you are new, please check out their home page.

{
 "commandline": "pwsh.exe",
 "fontFace": "CaskaydiaCove NF",
 "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 "hidden": false,
 "name": "PowerShell Core",
 "source": "Windows.Terminal.PowershellCore",
 "tabTitle": "PowerShell Core",
 "colorScheme": "SMYCK"
}

Anaconda Environments

We can create a custom profile with command line arguments to start a profile with specific Anaconda virtual environment. In other words, you can very easily create different profiles or tabs, for each Anaconda environment you have.

Subscribe to get access

Read more of this content when you subscribe today.

SSH Profile

When I was using AWS EMR or, AWS EC2 I had to use SSH prompt along with PuTTY. For authentication we would use ppk file and enable dynamic port forwarding. In principle Windows 10 has built in SSH client but for some reason, I ended up using a command line utility called Plink – from the same publisher of PuTTy.

{
 "commandline": "C:\\instals\\plink.exe -ssh -i %USERPROFILE%\\Documents\\data\\my-key.ppk -D 8088 ec2-user@xx.xx.xx.xx:xx",
 "cursorShape": "vintage",
 "guid": "{fc51cff4-926b-4287-b1a2-fa2f23dc78e5}",
 "hidden": false,
 "icon": "%USERPROFILE%\\Pictures\\icons\\rhel8.png",
 "name": "AWS EC2 Red Hat (RHEL8)"
},
{
 "commandline": "C:\\instals\\plink.exe -ssh -i %USERPROFILE%\\Documents\\data\\my-key.ppk -D 8088 hadoop@yy.yy.yyy.yy:yy",
 "cursorShape": "vintage",
 "guid": "{f8f0b31d-3ab5-49c7-b455-89dbfea31d14}",
 "hidden": false,
 "icon": "%USERPROFILE%\\Pictures\\icons\\aws.ico",
 "name": "AWS EMR SSH"
}

Git bash profile

If you have installed git bash, you can also create a profile for it.

{
 "commandline": "%USERPROFILE%\\AppData\\Local\\Programs\\Git\\bin\\bash.exe --cd-to-home",
 "cursorShape": "vintage",
 "guid": "{848fe68a-c7ab-4123-bbbc-bd24c792ca29}",
 "hidden": false,
 "icon": "%USERPROFILE%\\AppData\\Local\\Programs\\Git\\mingw64\\share\\git\\git-for-windows.ico",
 "name": "git bash"
}

Ubuntu Linux profile

If you have not already, follow these steps for installing Linux subsystem in Windows 10 and downloading a Linux distribution like Ubuntu from Microsoft Store: https://itsfoss.com/install-bash-on-windows/

{
 "colorScheme": "Ubuntu",
 "cursorColor": "#DD4814",
 "cursorShape": "filledBox",
 "fontFace": "Cascadia Mono",
 "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
 "hidden": false,
 "name": "Ubuntu-20.04",
 "source": "Windows.Terminal.Wsl",
 "icon": "%USERPROFILE%\\Pictures\\icons\\Ubuntu.ico",
 "useAcrylic": true,
 "acrylicOpacity": 0.85
}

2. Personalize – Oh my posh!

There is a very good chance that you have heard about this module.

Scott Hansekman’s YouTube video on how to set up Oh my posh

After you have completed the steps in the video above, and got it to work, you could download the themes and preview them using the following command. More documentation is available at: https://ohmyposh.dev/docs/.

$ Get-PoshThemes

If you are interested, you can download my very own custom theme for free at: https://gist.github.com/aarshtalati/085b9f757acb61242bbe8bd7c5829243.

Migrate Perforce to git(hub) repo


Assumptions

  • You have done your due diligence to compare the two (from price, speed, workflow, onboarding etc. perspectives) and have concluded that reasons to migrate Perforce to git are beneficial for you.
  • Word of caution. Do you have “large files”? Well, define “large”! Some cloud vendors set some limit for what is the maximum limit of your file could you upload to the cloud. Check out this Powershell script: Powershell.P4Sizes · GitHub

Migration

To prepare for surprises, plan ahead on how would you verify if the migration has succeeded!

Author
Continue reading “Migrate Perforce to git(hub) repo”

UI Path Task Capture in 1 minute


What is it?

  1. Screenshot and documentation tool on Steroids.
  2. It can take a series of screenshots and generate documentation in Microsoft Word template.
  3. Just like Windows’ built-in Snip and Sketch or Snipping tool but, with Microsoft Paint & OCR capabilities.
  4. Installs locally, just like Snappy.
  5. This tool can spit out a skeleton for RPA developers.
  6. This is to RPA developer, what Gherkin/Cucumber is to a C#/Java developer.

Benefit hypothesis

  1. Target audience:

Best VS Code ext & themes


Extensions:

Themes:

I am generally High Contrast kind of guy, who prefers the same for OS theme as well (just me) … but I might be a little bit inclined towards dark themes:

After high contrast, I prefer Phœnix Dark in particular for dark theme and GitHub Plus Theme for light theme. Themes like Popping and Locking Theme, Dracula Official overwhelm me with their colors.

AngularJS Tools


According to a sendesignz.com post

Screen Recording: Ubuntu


I have used CamStudio in Windows, and I am happy with it but, there are times when we have to make the most of what is available.This time, I needed to record screen-cast in Ubuntu.

# add-apt-repository ppa:maarten-baert/simplescreenrecorder
# apt update
# apt install simplescreenrecorder

Despite of being simple, it has all essential features of CamStudio for Windows or QuickTime for macOS, and it recorded very good quality of audio and video! Making itself my new favorite screen recording application.

Earlier, I tried using VLC for screen capturing, because it helps me to avoid yet another software program on my computer on my computer and, VLC also lets me choose file formats to save my recording to.

Here are the steps:

Continue reading “Screen Recording: Ubuntu”

Install OpenCV: ~10 min!


Disclaimers

  1. Tested on: Windows 7, Windows 10
  2. There could be other ways to get Open CV working on your Windows computer

Before installation

  1. Find you OS architecture
  2. Decide the Python version (e.g. 2.7 or 3.x)
  3. Install Anaconda, open terminal as administrator and , Continue reading “Install OpenCV: ~10 min!”

What’s Machine Learning?


What is Machine Learning? from E*D Films (Daniel Gies) on Vimeo.