قالب وردپرس درنا توس
Home / Tips and Tricks / How to Customize the New Windows Terminal App

How to Customize the New Windows Terminal App



  Windows Terminal with an Ocean Wave Background

With the new Windows Terminal App, Windows finally has a tabbed terminal running Cmd, PowerShell, and Bash prompts in the same window can be. It's also very customizable ̵

1; you can even set animated GIFs as the background.

Beyond the background, you can also change the theme of the terminal. Whether it's the color of the text or the background or the font style, you can make Windows Terminal your own. Microsoft has even added several preset topics. All you need is a text editor and some basic knowledge of JSON. If you are unfamiliar with JSON, you may still be able to make changes. We guide you through the following steps.

Customizing the Windows Terminal

  Windows terminal JSON configuration file with a custom background option.

The first step in customizing Windows Terminal is to make sure that Windows has a default app that maps to the JSON file type. The best way to do this is File Explorer.

Start the File Explorer and locate a JSON file. If you do not already have one, create one. Right-click on File Explorer and click New and then Text Document.

Rename the file to "test.json" (deleting the extension ".txt") and confirm that you want to change the extension. If the file extension .txt does not appear, instruct File Explorer to display the file extensions.

 Submenu File Explorer with arrows to New and Text Document

Then right-click on the new JSON file and select the "Open With" option. Choose your favorite text editor, be it Notepad ++ or Notepad.

After setting up a text editor for JSON files, it's time to make changes to the Windows Terminal settings. Open the Windows Terminal, click the down arrow in the title bar (to the right of the plus sign), and then choose Preferences.

 Windows terminal with arrows on the down arrow and the options for the settings.

A JSON file is started in the previously selected editor. Here you can make any changes.

Changing the background

  Windows terminal with a cat typing in the keyboard background. Gif

You can change the background to any kind of image file – a PNG, a JPEG, or even an animated GIF.

To change the background of one of the shells, you must first place the image file in a location that the terminal app can read. Windows Terminal is a UWP (Univeral Windows Platform) app. Therefore, the use of a separate AppData folder is preferred. AppData is a folder that you normally find in the user profile and that is used to save program settings. UWP apps create a custom AppData folder and use it instead. The AppData folder of Windows Terminal is located in:

% LOCALAPPDATA%  Packages  Microsoft.WindowsTerminal_8wekyb3d8bbwe  RoamingState 

Just copy it to the file explorer's path bar and press Enter. They are taken to the right place. Place your image files here, and Windows Terminal can use them as background.

 Provide background image for Windows Terminal

Open the settings in Windows Terminal and navigate to the profile you want to change. There are several profiles in the section "": . "Each corresponds to an option in the menu: Cmd, PowerShell, Linux distributions, etc. Using the lines" commandline "or" name "in each section, you can see which one is which.

To change the wallpaper for any of these sections, click " icon " line, add the following lines :

 "backgroundImage": "ms-appdata: ///roaming/yourimage.jpg",
"backgroundImageOpacity": 0.75,
"backgroundImageStrechMode": "fill", 

Where "yourimage.jpg" is the name of your image or GIF file. Make sure each line in the section – except the last one – ends with a comma.

If you're using a GIF file, you might want to change "fill" to "uniformToFill" instead. We ended up with a black box around our GIF with "Fill" but it was fine with "UniformToFill".

 Setting a background image in the JSON file of Windows Terminal

Save the file and make your changes immediately visible even when the Windows terminal is open.

Changing the Default Key Usage

The first section refers to key mapping if you do not like a particular key combination. You can change this here. For example, if you want Ctrl + e to close the tabs, you will find this section:

 {
"Command": "closeTab",
"Key":
[
 "ctrl+w"
 ]
},

Change "Ctrl + W" to "Ctrl + E" (be sure to keep the quotation marks), and then save the file. If you want to align everything to match the existing indentation, note that the file uses spaces instead of tabs. As can be seen in our screenshots, Unix line endings are used in the file, but most text editors (including Notepad) can easily handle Unix line endings Change default color scheme

Windows Terminal comes with several color schemes that change the font color Background color, the cursor shape, etc. are changed. You can select topics individually for Command Prompt, Bash, and PowerShell.

To change the default theme, first find the shell profile you want by scrolling to profiles: and look at the command-line entry in each subsection [19659003Forexampleatthecommandprompt: "commandline": "cmd.exe" Then change "colorScheme": "Campbell" to the color of your choice.You can choose between Campbell For example, if you want Solarized Light, change the color scheme to "colorScheme": "Solarized Light . These are the same color schemes used by the Microsoft colortool utility.

 Windows Terminal Color Scheme option for cmd.exe.


Windows Terminal is quite interesting and gives a glimpse of Microsoft's previous Windows set-up feature. At a minimum, you no longer have to switch between programs to switch between Command Prompt, PowerShell, and Bash.




Source link