Windows Terminal Setting ベータ版

Windows Terminalベータ版のカスタマイズです。

![](https://raw.githubusercontent.com/mba-hack/images/master/windows-terminal-setting-01.png)

## 追記

profile.jsonの仕様やアイコン画像の置き場所などが変更になっている模様。コメントにて指摘してくれた方がいますので、そちらを参照してください。

## Windows Terminal ベータ版の設定

`C:\Users\$USER\AppData\Local\Packages\Microsoft.WindowsTerminal_xxxxxxxx\RoamingState`にある`profiles.json`を編集します。

> profiles.json -> settings.json に変更になったみたいです


```sh
$ cd "C:\Users\$USER\AppData\Local\Packages\Microsoft.WindowsTerminal_xxxxxxxx\RoamingState"
$ ls
arch-32.png
ubuntu-32.png
cmd.png
pwsh.png
profiles.json

$ vim profiles.json
```

```json:profiles.json

{
    "defaultProfile": "{xxxx}",
    "initialRows": 30,
    "initialCols": 120,
    "alwaysShowTabs": true,
    "showTerminalTitleInTitlebar": true,
    "experimental_showTabsInTitlebar": false,
    "requestedTheme": "dark",
    "profiles": [
        {
            "startingDirectory": "C:/Users/syui",
            "name": "DOS but not DOS",
            "colorscheme": "Solarized Dark",
            "historySize": 9001,
            "snapOnInput": true,
            "cursorColor": "#00FF00",
            "cursorHeight": 25,
            "cursorShape": "vintage",
            "commandline": "cmd.exe",
            "fontFace": "Cascadia Code",
            "fontSize": 20,
            "acrylicOpacity": 0.85,
            "useAcrylic": true,
            "closeOnExit": false,
            "padding": "0, 0, 0, 0",
            "icon": "ms-appdata:///roaming/cmd-32.png"
        },
        {
            "startingDirectory": "C:/Users/syui",
            "name": "Powershell",
            "background": "#012456",
            "colorscheme": "Campbell",
            "historySize": 9001,
            "snapOnInput": true,
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "commandline": "powershell.exe",
            "fontFace": "Ubuntu Mono",
            "fontSize": 20,
            "acrylicOpacity": 0.85,
            "useAcrylic": true,
            "closeOnExit": false,
            "padding": "0, 0, 0, 0",
            "icon": "ms-appdata:///roaming/pwsh-32.png"
        },
        {
            "name": "Ubuntu",
            "colorscheme": "Ubuntu",
            "historySize": 9001,
            "snapOnInput": true,
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "commandline": "wsl.exe -d Ubuntu",
            "fontFace": "Fira Code",
            "fontSize": 20,
            "acrylicOpacity": 0.85,
            "useAcrylic": true,
            "closeOnExit": false,
            "padding": "0, 0, 0, 0",
            "icon": "ms-appdata:///roaming/ubuntu-32.png"
        },
        {
            "name": "Arch Linux",
            "colorscheme": "Campbell",
            "historySize": 9001,
            "snapOnInput": true,
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "commandline": "wsl.exe -d ArchLinux",
            "fontFace": "Consolas",
            "fontSize": 20,
            "acrylicOpacity": 0.85,
            "useAcrylic": true,
            "closeOnExit": false,
            "padding": "0, 0, 0, 0",
            "icon": "ms-appdata:///roaming/arch.png"
        }
    ],
    "schemes": [
        {
            "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"
            ]
        },
        {
            "name": "Solarized Light",
            "foreground": "#073642",
            "background": "#FDF6E3",
            "colors": [
                "#073642",
                "#D30102",
                "#859900",
                "#B58900",
                "#268BD2",
                "#D33682",
                "#2AA198",
                "#EEE8D5",
                "#002B36",
                "#CB4B16",
                "#586E75",
                "#657B83",
                "#839496",
                "#6C71C4",
                "#93A1A1",
                "#FDF6E3"
            ]
        },
        {
            "name": "Ubuntu",
            "foreground": "#EEEEEC",
            "background": "#2C001E",
            "colors": [
                "#EEEEEC",
                "#16C60C",
                "#729FCF",
                "#B58900",
                "#268BD2",
                "#D33682",
                "#2AA198",
                "#EEE8D5",
                "#002B36",
                "#CB4B16",
                "#586E75",
                "#657B83",
                "#839496",
                "#6C71C4",
                "#93A1A1",
                "#FDF6E3"
            ]
        }
    ]
}
```

`guid`は削除したあとに起動すると、追加されます。

ウィンドウの透過は、`"acrylicOpacity","useAcrylic"`です。1に近いほど無透過(透過なし)です。VirtualBoxで使っている場合は、`設定 > ディスプレイ > 3Dアクセラレーション`を有効にしましょう。

アイコンも`profile.json`があるフォルダにおいて、`ms-appdata:///Local/xxxx.png`というパスで有効になります。

https://github.com/microsoft/Terminal/issues/496