Directory and Git branch effects

Switch themes for multiple style choices

The shortcut menu

You can quickly open common projects and directories and configure SSH connections to the server


Installation and configuration

Windows Terminal

Fira Code font (choco install or download it yourself)

Posh -git and oh-my-Posh themes

ColorTool

Windows Terminal installed

Download from the Microsoft Store notice the system requirements


Install the Fira Code font

Choco can be installed but will fail due to network restrictions (I did not succeed, interested can try), suggest directly to Github download

Download address

After downloading, unzip the font files and install them manually


Install the Posh – Git and oh-my-Posh themes

Run PowerShell as super administrator by executing the following command installation in PowerShell

CurrentUser installs modules for the CurrentUser only

Install-Module posh-git -Scope CurrentUser 
Install-Module oh-my-posh -Scope CurrentUser
Copy the code

Configure and switch themes

The default theme

The input

    $PROFILE
    
    C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Copy the code

Continue typing:

    if(! (Test-Path -Path$PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
    notepad $PROFILE
    
Copy the code

Add to the open file: set-theme AgnosterPlus is to Set the default Theme

    Import-Module posh-git
    Import-Module oh-my-posh
    Set-Theme AgnosterPlus
        
Copy the code

After saving, close notepad and enter the following command in the terminal to take effect (do not copy the value of $PROFILE below)

    C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Copy the code

Switch the theme

Set-theme Specifies the Theme nameCopy the code

Other optional topics are

Agnoster, Avit, Darkblood, Fish, Honukai, Paradox, Sorin, Tehrob


Windows Terminal configuration

Detailed configuration on the official website

Open the configuration file setting.json

Add the following reference configuration, you can modify, must conform to the JSON content format, otherwise an error will be reported, and the path of the picture should be corresponding to your system



{
    "$schema": "https://aka.ms/terminal-profiles-schema".    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}". "copyOnSelect": false. "copyFormatting": false. "profiles":  { // Default configuration "defaults":  {  "fontFace": "Fira Code", // oh-my-posh theme reason, using other fonts may cause garbled characters "backgroundImage": "C:\\bash-bg.jpg", // Background image address "backgroundImageOpacity": 0.5, // Transparency "colorScheme" : "Andromeda", // Color scheme "acrylicOpacity": 0.7. "useAcrylic":true  }, // The drop-down shortcut menu list// Guid Unique id do not repeat// Name Indicates the name displayed in the drop-down menu// tabTitle Indicates the name displayed in the TAB tag// CommandLine Specifies the terminal or command to load// startingDirectory Specifies the default directory./ / icon icon// historySize historySize "list":  [  {  "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}". "name": "rent-web". "tabTitle": "rent-web". "commandline": "powershell.exe". "startingDirectory": "D:\\obj\\newObj\\Rents\\rent-web". "icon": "D:\\obj\\newObj\\Rents\\rent-web\\src\\assets\\logo\\logo.png". "hidden": false  },  {  // Make changes here to the powershell.exe profile.  "guid": "{55daf408-4c33-abb5-a9da-af3450acad44}". "name": "Parts". "tabTitle": "Parts". "commandline": "powershell.exe". "startingDirectory": "D:\\obj\\Parts". "hidden": false. "icon": "C:\\Users\\Administrator\\Pictures\\logo\\w.jpg"  },  {  // Make changes here to the powershell.exe profile.  "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44ba}". "name": "myObj". "tabTitle": "myObj". "commandline": "powershell.exe". "startingDirectory": "D:\\myObj". "icon": "C:\\Users\\Administrator\\Pictures\\logo\\m.png". "hidden": false  },  {  "guid": "{f323ab3c-9641-4904-a3a6-dc4e4992b6ae}". "name": "Git Bash". "commandline": "%programfiles%\\Git\\bin\\bash.exe --cd-to-home". "hidden": false. "fontSize": 12. "historySize": 9001,  "tabTitle": "git bash". "icon": "C:\\git-bash.png"  },  {  // Make changes here to the cmd.exe profile.  "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}". "name": "Command prompt". "commandline": "cmd.exe". "hidden": false  },  {  "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}". "hidden": false. "name": "Azure Cloud Shell". "source": "Windows.Terminal.Azure"  },  {  "guid": "{975b5e3c-f525-f0be-e609-1af5ae6ae013}". "name": "My server.". "commandline": "ssh [email protected]". "hidden": false. "historySize": 9001,  "tabTitle": "My server.". "icon": "C:\\Users\\Administrator\\Pictures\\logo\\ubuntu.png"  }  ]  }, // Color scheme "schemes": [  {  "name": "Andromeda". "black": "# 000000". "red": "#cd3131". "green": "#05bc79". "yellow": "#09da0f". // "yellow": "#e5e512". "blue": "#2472c8". "purple": "#bc3fbc". "cyan": "#0fa8cd". "white": "#e5e5e5". "brightBlack": "# 666666". "brightRed": "#cd3131". "brightGreen": "#05bc79". "brightYellow": "#09da0f". // "brightYellow": "#e5e512". "brightBlue": "#2472c8". "brightPurple": "#bc3fbc". "brightCyan": "#0fa8cd". "brightWhite": "#e5e5e5". "background": "#262a33". "foreground": "#e5e5e5"  },  {  "name": "Campbell". "foreground": "#F2F2F2". "background": "#0C0C0C". "colors": [  "#0C0C0C". "#C50F1F". "#13A10E". "#C19C00". "#0037DA". "# 881798". "#3A96DD". "#CCCCCC". "# 767676". "#E74856". "#16C60C". "#F9F1A5". "#3B78FF". "#B4009E". "#61D6D6". "#F2F2F2"  ]  },  {  "name": "Solarized Dark". "foreground": "#FDF6E3". "background": "# 073642". "colors": [  "# 073642". "#D30102". "# 859900". "#B58900". "#268BD2". "#D33682". "#2AA198". "#EEE8D5". "#002B36". "#CB4B16". "#586E75". "#657B83". "# 839496". "#6C71C4". "#93A1A1". "#FDF6E3"  ]  } ]. "keybindings":  [  { "command": {"action": "copy"."singleLine": false }, "keys": "ctrl+c" },  { "command": "paste"."keys": "ctrl+v" },  { "command": "find"."keys": "ctrl+shift+f" },  { "command": { "action": "splitPane"."split": "auto"."splitMode": "duplicate" }, "keys": "alt+shift+d" }  ] }    Copy the code

My blog

I’m the nuggets

My Jane books

Laravel China

My wechat official account