Windows Terminal 完全配置教程(主题以及启动设置)
生活随笔
收集整理的這篇文章主要介紹了
Windows Terminal 完全配置教程(主题以及启动设置)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、安裝Windows terminal
Microsoft Store搜索Windows terminal
第一個和第二個都可以!!
?
二、選擇主題
Windows terminal提供了大量的主題可以選擇,當然也可以像VScode文本編輯器一樣自行配置。
登陸如下網址,選擇一個你喜歡的主題復制主題代碼
https://atomcorp.github.io/themes/
三、配置主題
打開Windows terminal
Win+R運行,輸入wt
點擊Windows terminal中的下拉箭頭選擇設置,打開配置Windows Terminal的Json文件。
將復制的主題代碼粘貼到在list中,分別配置PowerShell的主題和cmd的主題,添加剛才獲得代碼即可應用對應的主題。name為標識,用于設置終端應用哪個主題。
?
我的主題配置如下:
// This file was initially generated by Windows Terminal Preview 1.5.3242.0 // It should still be usable in newer versions, but newer versions might have additional // settings, help text, or changes that you will not see unless you clear this file // and let us generate a new one for you. // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation {"$schema": "https://aka.ms/terminal-profiles-schema","defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",// You can add more global application settings here.// To learn more about global settings, visit https://aka.ms/terminal-global-settings// If enabled, selections are automatically copied to your clipboard."copyOnSelect": false,// If enabled, formatted data is also copied to your clipboard"copyFormatting": false,// A profile specifies a command to execute paired with information about how it should look and feel.// Each one of them will appear in the 'New Tab' dropdown,// and can be invoked from the commandline with `wt.exe -p xxx`// To learn more about profiles, visit https://aka.ms/terminal-profile-settings"profiles": {"defaults": /*全局配置*/ {// Put settings here that you want to apply to all profiles// 默認打開的 Profile GUID(下面會詳細介紹)"defaultProfile": "{97838c1f-307b-477a-b7fe-c9965c347e0b}","startingDirectory": null,// 終端窗口默認大小"initialCols": 120,"initialRows": 30,// 亮色或暗色主題,可選值 "light", "dark", "system""requestedTheme": "system",// 合并標題欄和標簽欄"showTabsInTitlebar": true,// 如果 showTabsInTitlebar 與本值同為 false 時,自動隱藏標簽欄"alwaysShowTabs": true,// 在標題欄上顯示當前活動標簽頁的標題"showTerminalTitleInTitlebar": true,// 雙擊選擇時用于分詞的字符"wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",// 選擇時復制到剪貼板"copyOnSelect": true,// ...},"list": /*每種類型terminal的詳細配置*/ [{// Make changes here to the cmd.exe profile 關于cmd的配置"guid": "{97838c1f-307b-477a-b7fe-c9965c347e0b}",/*網頁搜索guid生成可以獲得每個程序唯一的guid,visual studio內的工具也有生成guid的功能*/"name": "CMD","commandline": "cmd.exe",/*程序位置*/"hidden": false,"tabTitle": "CMD", /*名稱*/"foreground": "#DCDCDC", /*字體顏色*/"icon": "C:/Users/ChiamZhang/Pictures/Saved Pictures/vz.jpeg", /*ICO圖標*/"backgroundImage": "C:/Users/ChiamZhang/Pictures/Saved Pictures/back.jpg", /*終端背景圖*/"acrylicOpacity": 0.95,/*亞克力透明效果*/"backgroundImageOpacity": 0.70,/*背景透明度*/"backgroundImageStretchMode": "fill","closeOnExit": true,"colorScheme": "Campbell","cursorColor": "#FFFFFF","cursorShape": "bar","fontFace": "Consoles","fontSize": 12,"historySize": 9001,"padding": "0, 0, 0, 0","snapOnInput": true,"startingDirectory": "%USERPROFILE%","useAcrylic": true},{// Make changes here to the powershell.exe profile"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","name": "Windows PowerShell","commandline": "powershell.exe","hidden": false,"tabTitle": "PowerShell","foreground": "#DCDCDC","icon": "C:/Users/ChiamZhang/Pictures/Saved Pictures/vz2.png","backgroundImage": "C:/Users/ChiamZhang/Pictures/Saved Pictures/back2.jpeg","acrylicOpacity": 0.95,/*亞克力透明效果*/"backgroundImageOpacity": 0.70,"backgroundImageStretchMode": "fill","colorScheme": "Campbell","cursorColor": "#FFFFFF","cursorShape": "bar","fontFace": "Consoles","fontSize": 12,"historySize": 9001,"padding": "0, 0, 0, 0","snapOnInput": true,"startingDirectory": "%USERPROFILE%","useAcrylic": true},{// Make changes here to the Anaconda Prompt profile 關于anaconda的配置"guid": "{FCAD2812-51E4-4E55-96AF-2F2B75628FE0}","name": "anaconda prompt","commandline": "%windir%\\System32\\cmd.exe /K D:\\Users\\KuroNeko\\Anaconda3\\Scripts\\activate.bat","hidden": false,"tabTitle": "Anaconda Prompt", /*名稱*/"foreground": "#DCDCDC", /*字體顏色*/"icon": "C:/Users/ChiamZhang/Pictures/Saved Pictures/vz2.png", /*ICO圖標*/"backgroundImage": "C:/Users/ChiamZhang/Pictures/Saved Pictures/back2.jpeg", /*終端背景圖*/"acrylicOpacity": 0.75,"backgroundImageOpacity": 0.1,"backgroundImageStretchMode": "fill","closeOnExit": true,"colorScheme": "Campbell","cursorColor": "#FFFFFF","cursorShape": "bar","fontFace": "Consolas","fontSize": 11,"historySize": 9001,"padding": "0, 0, 0, 0","snapOnInput": true,"startingDirectory": "%USERPROFILE%","useAcrylic": true},{// Make changes here to the Git Bash profile 關于Git bash的配置"guid": "{4B25BFD9-4962-49AE-8512-BBD336462BAB}","name": "Git Bash","commandline": "D:\\Program Files (x86)\\Git\\bin\\bash.exe","hidden": false,"tabTitle": "Git Bash", /*名稱*/"foreground": "#DCDCDC", /*字體顏色*/"icon": "C:/Users/ChiamZhang/Pictures/Saved Pictures/vz.jpeg", /*ICO圖標*/"backgroundImage": "C:/Users/ChiamZhang/Pictures/Saved Pictures/back.jpg", /*終端背景圖*/"acrylicOpacity": 0.75,"backgroundImageOpacity": 0.25,"backgroundImageStretchMode": "fill","closeOnExit": true,"colorScheme": "Campbell","cursorColor": "#FFFFFF","cursorShape": "bar","fontFace": "Consolas","fontSize": 11,"historySize": 9001,"padding": "0, 0, 0, 0","snapOnInput": true,"startingDirectory": "%USERPROFILE%","useAcrylic": true},{"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}","hidden": false,"name": "Azure Cloud Shell","source": "Windows.Terminal.Azure"}]},// Add custom color schemes to this array"schemes": [],// Add any keybinding overrides to this array.// To unbind a default keybinding, set the command to "unbound"// Add custom color schemes to this array.// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes// Add custom actions and keybindings to this array.// To unbind a key combination from your defaults.json, set the command to "unbound".// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings"actions": [// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.// These two lines additionally bind them to Ctrl+C and Ctrl+V.// To learn more about selection, visit https://aka.ms/terminal-selection{"command": {"action": "copy","singleLine": false},"keys": "ctrl+c"},{"command": "paste","keys": "ctrl+v"},// Press Ctrl+Shift+F to open the search box{"command": "find","keys": "ctrl+shift+f"},// Press Alt+Shift+D to open a new pane.// - "split": "auto" makes this pane open in the direction that provides the most surface area.// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.// To learn more about panes, visit https://aka.ms/terminal-panes{"command": {"action": "splitPane","split": "auto","splitMode": "duplicate"},"keys": "alt+shift+d"}] }
配置啟動Windows Terminal默認打開的終端,這樣打開Windows Terminal默認啟動的就是cmd終端了。
四、更高級的打開方式
通過地址欄啟動
? ? ? 在配置文件中添加如下代碼,可以在地址欄輸入WT即可以啟動。
?
通過右鍵菜單啟動
添加右鍵菜單,在任意路徑下右鍵選擇Windows Terminal啟動
注冊表進入如下路徑
默認應該會有兩個子項,cmd和powershell
右擊shell新增項Windows Terminal
新增下圖所示的四個字符串值及一個DWORD值
在Windows Terminal上右鍵新建項command
修改默認值為:
?
C:\Users\你的用戶名\AppData\Local\Microsoft\WindowsApps\wt.exe -d "%V"?
?
配置完成即可在任意文件夾內右鍵打開Windows Terminal
?
更多配置信息參考官方配置文檔
Windows 終端中的配置文件設置
總結
以上是生活随笔為你收集整理的Windows Terminal 完全配置教程(主题以及启动设置)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 服务器虚拟化的方式有哪些
- 下一篇: OS部分简答题目