美文网首页windows美化
windows terminal安装和体验

windows terminal安装和体验

作者: 南有纸鸢 | 来源:发表于2019-08-24 15:56 被阅读21次

windows terminal发布有这么久了,最近突然想折腾一下这个东西,费了一番功夫才弄好。

我是先去了github上的官方库大概的了解了一下,在releases里面下了.misxbundle(其实可以在MicroSoft Store下载),找了个视频跟着弄,结果发现我的系统环境安装不了。官方库的readme是这样写的:

官方库上的开发条件

后面了解到,系统需要1903版本的才能安装。然而我的系统是1803!!!虽然平时偶尔检查更新,有更新也更了,但是我也不知道为什么还是1803版本的,可能跟后面遇到的一个问题有关。于是先折腾系统吧。
win10更新到1903的方法(我用的易升,不会清除我之前的系统数据)

期间遇到了这个问题:


大概意思是,驱动问题,我到设备管理器找到这个驱动更新没啥用,直接去inter官网下载最新的安装,之后就能继续升级系统了。
然后,去应用商店下载安装吧。

安装完之后打开,发现其实初始也不是网上说的那种,各种配色方案,各种字符表情。还是和原本的cmd以及powershell一样,只不过是打开的时候,两个是作为windows terminal的选项卡而已,也就是这样的:

接下来进行DIY吧,点击选项卡旁边的下拉,会出现以下几个选项(powershell和cmd是会有的,其他看自己是否添加,我这里是自己安装了wsl),选择settings将会打开profiles.json,也就是配置文件,需要注意的是,好像只能用visual studio打开,我在visual studio 2019更新的时候打开失败。

配置文件可以对windows terminal进行各种属性的调整
globals(全局属性)
profiles(配置文件,列出了每一项的属性配置)
schemes(配色方案)
具体的每一种属性相关的信息,在github官方库的SettingsSchema.md中都有详细列表。

背景毛玻璃效果:
"useAcrylic": true, //背景毛玻璃效果(没有图片作为背景时明显)

cmd用图片做背景,只需要在profiles下面属于cmd的那一话括号内添加以下内容:
"backgroundImage" : "imagepath", //imagepath为背景图片路径
"backgroundImageOpacity" : 0.5, //背景图片的透明度(只是图片透明,背景不透明并不会透明到看到窗口下层的东西)
"backgroundImageStretchMode" : "fill",//背景图像填充方式

字体:
"fontFace" : "Consolas", //字体样式
"fontSize" : 11, //字号
"foreground" : "#FFFFFF", //字体颜色

我的配色方案:

{
            //powershell
            "acrylicOpacity" : 0.5,
            "backgroundImage" : "E:/wallpaper/loli/1.jpg",
            "backgroundImageOpacity" : 0.5,
            "backgroundImageStretchMode" : "fill",
            "colorScheme" : "Campbell",
            "commandline" : "powershell.exe",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 11,
            "foreground" : "#00FF00",
            "guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
            "name" : "Windows PowerShell",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "tabTitle" : "powershell",
            "useAcrylic" : true
        },
        {
            //cmd
            "acrylicOpacity" : 0.75,
            "backgroundImage" : "E:/wallpaper/loli/2.jpg",
            "backgroundImageOpacity" : 0.5,
            "backgroundImageStretchMode" : "fill",
            "closeOnExit" : true,
            "colorScheme" : "Campbell",
            "commandline" : "cmd.exe",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 11,
            "foreground" : "#00FF00",
            "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
            "name" : "cmd",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "tabTitle" : "cmd",
            "useAcrylic" : true
        },
      {
         //wsl:ubuntu 18.04
        "acrylicOpacity": 0.75,
        "background": "#000000",
        "backgroundImage": "E:/wallpaper/ubuntu-wap.png",
        "backgroundImageOpacity": 1.0,
        "backgroundImageStretchMode": "fill",
        "closeOnExit": true,
        "colorScheme": "Campbell",
        "commandline": "wsl.exe",
        "cursorColor": "#FFFFFF",
        "cursorShape": "bar",
        "fontFace": "Consolas",
        "fontSize": 11,
        "foreground": "#00FF00",
        /*guid:配置文件的唯一标识符。以注册表格式编写:"{00000000-0000-0000-0000-000000000000}"*/
        "guid": "{0cae0dad-35be-5fc8-abdf-afcedeaa6301}",  //我是自己随便编的
        "historySize": 9001,
        "icon": "C:/Users/18447/AppData/Roaming/ubuntu.png",
        "name": "ubuntu",
        "padding": "0, 0, 0, 0",
        "snapOnInput": true,
        "startingDirectory": "C:/Users/18447/AppData/Local/Packages/CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc/LocalState/rootfs/",
        "tabTitle": "ubuntu 18.04",
        "useAcrylic": true
      }

截图:

cmd powershell ubuntu

文字暂时还是单一的颜色,也没有捣鼓网上那些配色方案以及表情字符什么的,以后有时间再折腾吧,我自己平时这样用着就行了。

相关文章

网友评论

    本文标题:windows terminal安装和体验

    本文链接:https://www.haomeiwen.com/subject/bcfnsctx.html