当前位置:   article > 正文

Windows Terminal 配置_windows terminal如何配置

windows terminal如何配置

目前的 Windows Terminal 配置还只能以 json 文本方式编辑,后续新版会增加 UI 设置界面,那时候配置会方便很多

这里备份下当前的配置,点击菜单栏下拉菜单的 Settings 或者快捷键 “Ctrl + ,” 打开配置文件 settings.json

设置默认终端和大小

将 defaultProfile 值替换为下方 profiles 中你要的 guid 值,并设置终端窗口默认宽高

  1. {
  2. "$schema": "https://aka.ms/terminal-profiles-schema",
  3. "defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
  4. "initialCols": 90,
  5. "initialRows": 25,
  6. ...
  7. }

终端参数

profiles 下多个终端配置排列对应实际在菜单栏看到的排列顺序

  1. "profiles":
  2. {
  3. "defaults":
  4. {
  5. "useAcrylic": true,
  6. "acrylicOpacity": 0.7,
  7. "fontFace": "Cascadia Code PL",
  8. "fontSize": 10,
  9. "cursorShape" : "underscore",
  10. "cursorColor" : "#000000",
  11. "historySize": 999999,
  12. "selectionBackground": "#EE3A8C",
  13. "colorScheme": "One Half Light"
  14. },
  15. "list":
  16. [
  17. {
  18. "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
  19. "name": "Ubuntu-20.04",
  20. "source": "Windows.Terminal.Wsl",
  21. "icon": "C:\\Users\\Gelomen\\ubuntu.ico",
  22. "hidden": false
  23. },
  24. ...
  25. }

终端配色

推荐两个配色网站:TerminalSplash 和 Windows Terminal Themes

  1. {
  2. ...
  3. "schemes": [
  4. {
  5. "name": "Cobalt2",
  6. "black": "#000000",
  7. "red": "#ff0000",
  8. "green": "#38de21",
  9. "yellow": "#ffe50a",
  10. "blue": "#1460d2",
  11. "purple": "#8A2BE2",
  12. "cyan": "#00bbbb",
  13. "white": "#bbbbbb",
  14. "brightBlack": "#555555",
  15. "brightRed": "#f40e17",
  16. "brightGreen": "#3bd01d",
  17. "brightYellow": "#edc809",
  18. "brightBlue": "#5555ff",
  19. "brightPurple": "#ff55ff",
  20. "brightCyan": "#6ae3fa",
  21. "brightWhite": "#ffffff",
  22. "background": "#132738",
  23. "foreground": "#ffffff"
  24. },
  25. {
  26. "name" : "Frost",
  27. "background" : "#FFFFFF",
  28. "black" : "#3C5712",
  29. "blue" : "#17b2ff",
  30. "brightBlack" : "#749B36",
  31. "brightBlue" : "#27B2F6",
  32. "brightCyan" : "#13A8C0",
  33. "brightGreen" : "#89AF50",
  34. "brightPurple" : "#F2A20A",
  35. "brightRed" : "#F49B36",
  36. "brightWhite" : "#741274",
  37. "brightYellow" : "#991070",
  38. "cyan" : "#3C96A6",
  39. "foreground" : "#000000",
  40. "green" : "#6AAE08",
  41. "purple" : "#991070",
  42. "red" : "#8D0C0C",
  43. // "white" : "#6E386E",
  44. "white" : "#FFFFFF",
  45. "yellow" : "#991070"
  46. }
  47. ],
  48. ...
  49. }

 但我目前使用的是内置配色 One Half Light,内置配色直接设置即可:

"colorScheme": "One Half Light"

绑定快捷键

  1. {
  2. ...
  3. "keybindings": [
  4. {
  5. "command": "closeTab",
  6. "keys" : [
  7. "ctrl+w"
  8. ]
  9. },
  10. {
  11. "command":
  12. {
  13. "action": "splitPane",
  14. "split": "horizontal"
  15. },
  16. "keys": "ctrl+-"
  17. },
  18. {
  19. "command":
  20. {
  21. "action": "splitPane",
  22. "split": "vertical"
  23. },
  24. "keys": "ctrl+plus"
  25. }
  26. ]
  27. ...
  28. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/709526
推荐阅读
相关标签
  

闽ICP备14008679号