定制自己的windows terminal。支持分屏多标签页的生产力工具?

一直以来都在Windows环境下配置管理Linux服务器,一个趁手好用的终端是必须的。从Putty,SecureCRT,Xshell到MobaXterm这些终端工具各有千秋。

现在主力用MobaXterm,全功能终端不是盖的,多协议登录,多标签,4分屏,用户session自动登录,远程编辑文件,Sftp,X11 Server,网络工具集等,功能强大一个工具基本全覆盖,唯一的缺点就是功能集成太多稍微有点慢。

偶然用windows自带的cmd或者power shell登录服务器,无奈功能太弱,直到windows terminal出现,虽然是预览版,不过已经体现了强大的潜力。特此记录一些配置心得,欢迎大家讨论。

分屏多窗格控制热键

  • 水平分屏:Alt + Shift + 减号 (-水平分屏)
  • 垂直分屏:Alt + Shift + 加号 (+垂直分屏)
  • 各分屏之间移动光标: Alt + “上下左右”
  • 调整水平分屏的窗口大小:Alt + Shift + “左右”
  • 调整垂直分屏的窗口大小:Alt + Shift + “上下”

分屏功能目前的限制,新的分屏只能是默认终端,没找到可以设置的地方,因此需要在配置文件中把需要分屏终端改成默认终端

自定义界面

下箭头—>settings,默认调用文本编辑器(vscode)编辑配置文件profiles.jason,配置文件主要包括profiles,schema,keybindings三部分

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{8c6172a9-0cc4-469a-b1cc-2a458e21a00a}",
    "profiles":
    {
        "defaults":
        {
            //界面效果,字体等
        },
        "list":
        [
        	//终端列表
        ]
    },

    "schemes": [
        {
            //配色方案
        }
    ],
    "keybindings": []
}
背景效果
 "defaults":
 {
     // Put settings here that you want to apply to all profiles
     "acrylicOpacity" : 0.8,     //毛玻璃不透明度
     "useAcrylic": true,         //毛玻璃特效
     //"backgroundImage" : "e://racoon//Pictures//img2.jpg",     //背景图片
     //"backgroundImageOpacity" : 0.35,                          //背景图片不透明度
     //"backgroundImageStretchMode": "fill",                     //背景图像扩展模式
     //"fontFace": "Fira Code light",                            //字体
     //"fontFace" : "DejaVu Sans Mono",
     //"fontFace" : "Consolas",
     "fontSize" : 12
 },
自定义多终端列表
  {
      // Make changes here to the ssh profile
      "guid": "{8c6172a9-0cc4-469a-b1cc-2a458e21a00a}",
      "name": "vm_ub1404_i386",
      "commandline": "ssh -p 22 racoon@192.168.91.100",
      "colorScheme": "Ubuntu",
      "hidden": false
  },
  {
      // Make changes here to the powershell.exe profile
      "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
      "name": "Windows PowerShell",
      "commandline": "powershell.exe",
      "hidden": false,
      "colorScheme": "IC_Orange_PPL"
  },
  {
      // Make changes here to the cmd.exe profile
      "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
      "name": "cmd",
      "commandline": "cmd.exe",
      "hidden": false,
      "colorScheme": "3024 Day"
  },
配色方案

配色库:https://github.com/mbadolato/iTerm2-Color-Schemes

   {
       "name": "Ubuntu",
       "black": "#2e3436",
       "red": "#cc0000",
       "green": "#4e9a06",
       "yellow": "#c4a000",
       "blue": "#3465a4",
       "purple": "#75507b",
       "cyan": "#06989a",
       "white": "#d3d7cf",
       "brightBlack": "#555753",
       "brightRed": "#ef2929",
       "brightGreen": "#8ae234",
       "brightYellow": "#fce94f",
       "brightBlue": "#729fcf",
       "brightPurple": "#ad7fa8",
       "brightCyan": "#34e2e2",
       "brightWhite": "#eeeeec",
       "background": "#300a24",
       "foreground": "#eeeeec"
   },

最终的分屏效果

分屏效果

结语

虽然windows terminal是预览版,已经可以正常使用,分屏功能更是强大,windows原生的终端用起来很方便,不过字体渲染和显示还有些不稳定,支持分屏多标签页能否作为生产力工具,我觉得对于linux来说windows terminal还是洗洗睡把,和tmux相比windows terminal的分屏和多标签就是玩具,每个一个分屏和标签都是终端也是会话;只有tmux才是真正把终端和会话分离了,而且支持多会话,多窗口(标签),多窗格(分屏),功能强大到没朋友,tmux才是真正的生产力工具。
最后,顺便吐槽下微软的Powertoys预览版,我就想试试桌面分屏的效果,你丫预览版居然卸载有BUG。

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值