How to add taskbar shortcut for Windows Terminal profiles

The only reason the modern Windows Taskbar is useful, is for the keyboard shortcuts it brings.

In this blog post I’ll share a neat trick for adding a shortcut for any Windows Terminal profile (Specifically for WSL here)

Example Taskbar Shortcut

As you can see in the image above, when I open the shortcut with the wsl icon(nr. 2), a new Windows Terminal tab will open with the Ubuntu profile and all of the customization I made.
This is not the default behavior if you just link the wsl executable, wt will indeed launch(If its the default term application) but it will not open in the appropriate profile and so all of the customization for the profile will not show.

Also this is not just a wsl problem, other apps like MSYS2 can have the same problem.
Image bellow shows MSYS2 (UCRT64) launched like a wt profile and the default behavior (launching mintty).

Step 0: Checking which profile you want

It’s important to first check the exact name for the profile you want and also to verify it by trying to launch the profile from the cli. (The shortcut we’ll be making is like a cli command)

In general the syntax will be like this:

wt new-tab --profile "<name of profile>"

Be sure to replace the <name of profile> with the actual profile you want. (duh.)

Step 1: Creating the new shortcut

Believe it or not, the first step in creating a taskbar shortcut is creating just a regular Windows shortcut.

For the “location” of the shortcut you want to enter the command mentioned above.

Note: It’s not necessary to enter the full path of the wt executable, the wizard will find the path for you.

Next for the name type something useful and short.

Congratulations! You just made a regular shortcut 🎉

Part 2: Changing the icon of the shortcut

Notice now, how the shortcut doesn’t have a nice icon.

You can change the icon the actual exe it’s meaning to open inside wt.

To do this, open the "properties" of the file and select "change icon".

You can now paste the location for the exe you want.

If you don’t know the location you can look it up from the win search menu and click on “Open file location”.

You can then copy the location of the exe

After you finally have the location of the exe you want, you can go and change the icon.

The final shortcut will look like a simple shortcut for the program you want.

Step 3: Add the shortcut to the taskbar

Finally you can link the shortcut to the taskbar via a simple drag and drop.

You don’t need to keep the original shortcut after linking it, so you can just delete it.

Congratulations! You just linked a wt profile to the taskbar 🎉

Conclusion

As you can see, linking a wt profile to the taskbar isn’t that difficult and the productivity boost of having those shortcuts is 120% worth it.

Even tho in this post I just added the wsl profile you can add any profile you want, like different MSYS2 environments or maybe the python interpreter. You chose!

Sources/Further reading: