推薦一款 顏值爆表的主題終端 (windows )

目錄和git分支效果

切換主題 多種風格選擇

快捷菜單

快速打開經常使用項目和目錄,還可配置服務器 ssh鏈接前端


安裝和配置

Windows Terminalgit

Fira code字體(choco安裝或直接自行下載安裝)github

posh-git和oh-my-posh主題web

ColorToolshell

Windows Terminal 安裝

Microsoft Store 中下載 注意系統要求json


Fira code 字體 安裝

可經過 choco 安裝 但受網絡限制會失敗(我是沒成功,有興趣的能夠試試),建議直接去 github 下載ubuntu

下載地址windows

下載完後解壓 把字體文件手動安裝bash


安裝 posh-git和oh-my-posh主題

經過在 PowerShell 中執行下面的命令安裝, 以超級管理員運行 PowerShell服務器

CurrentUser 是僅爲當前用戶安裝模塊

Install-Module posh-git -Scope CurrentUser 
Install-Module oh-my-posh -Scope CurrentUser
複製代碼

配置和切換主題

默認主題

輸入

$PROFILE
  C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 複製代碼

繼續輸入:

if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
 notepad $PROFILE  複製代碼

在打開的文件中添加: Set-Theme AgnosterPlus 是設置默認主題

Import-Module posh-git
 Import-Module oh-my-posh  Set-Theme AgnosterPlus  複製代碼

保存後關閉記事本, 在終端中輸入如下命令生效(這裏不要照抄 下面執行的 是 上文中$PROFILE的值)

C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
複製代碼

切換主題

Set-Theme 主題名字
複製代碼

其餘可選主題有

Agnoster、Avit、Darkblood、Fish、Honukai、Paradox、Sorin、tehrob


Windows Terminal配置

官網詳細配置說明

打開配置文件 setting.json

加入如下參考配置,可自行修改,必定要符合json的內容格式,否則會報錯,還有就是圖片的的路徑要與己系統對應

 {  "$schema": "https://aka.ms/terminal-profiles-schema",  "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",  "copyOnSelect": false,  "copyFormatting": false,  "profiles":  {  // 默認配置  "defaults":  {  "fontFace": "Fira Code", // oh-my-posh 主題緣由,使用其餘的字體可能會出現亂碼  "backgroundImage": "C:\\bash-bg.jpg", // 背景圖片地址  "backgroundImageOpacity": 0.5, // 透明度  "colorScheme" : "Andromeda", // 顏色方案  "acrylicOpacity": 0.7,  "useAcrylic":true  },  // 下拉快捷菜單 list  // guid 惟一id 切記不要重複  // name 下拉菜單中展現的名字  // tabTitle tab標籤中 展現的名字  // commandline 要加載的終端或命令  // startingDirectory 默認目錄 不填則打開用戶目錄,  // icon 圖標  // 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": "命令提示符",  "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": "個人服務器",  "commandline": "ssh root@test.com",  "hidden": false,  "historySize": 9001,  "tabTitle": "個人服務器",  "icon": "C:\\Users\\Administrator\\Pictures\\logo\\ubuntu.png"  }  ]  },  // 配色方案  "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" }  ] }    複製代碼

個人博客

個人掘金

個人簡書

Laravel China

個人微信公衆號
個人微信公衆號
相關文章
相關標籤/搜索