Terminal: [Feature] New Profile -> with Split view?

Created on 12 Apr 2020  路  7Comments  路  Source: microsoft/terminal

Description of the new feature/enhancement

I would like some way to define a Profile, where splitscreen is allready defined. How can we do this best?

Or is it allready in there?

Proposed technical implementation details (optional)

image

What would the syntax be? :)

Area-Settings Issue-Question Product-Terminal Resolution-Answered Resolution-Duplicate

Most helpful comment

I guess I'll speak for the original poster. I guess I'd like to see profile syntax that lets me specify an array of split panels including whether it is horizontal or vertical. It other words, the profile setting becomes an array of sub-panels. Maybe something like this:

   "profiles": [
        {
                "tabTitle": "PowerShell Panels",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "panels": [
                    {
                    "acrylicOpacity": 0.5,
                    "background": "#012456",
                    "closeOnExit": true,
                    "colorScheme": "Campbell",
                    "commandline": "powershell.exe -nologo",
                    "split": "horizontal",
                    "cursorColor": "#FFFFFF",
                    "cursorShape": "bar",
                    "fontFace": "Consolas",
                    "fontSize": 14,
                    "historySize": 9001,
                    "icon": "ms-appx:/// ProfileIcon s/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
                    "name": "Windows PowerShell",
                    "padding": "0, 0, 0, 0",
                    "snapOnInput": true,
                    "startingDirectory": "%USERPROFILE%",
                    "useAcrylic": false
                },
                {
                    "acrylicOpacity": 0.5,
                    "background": "#012456",
                    "closeOnExit": true,
                    "colorScheme": "Campbell",
                    "commandline": "pwsh -nologo",
                    "split": "auto",
                    "cursorColor": "#FFFFFF",
                    "cursorShape": "bar",
                    "fontFace": "Consolas",
                    "fontSize": 14,
                    "historySize": 9001,
                    "name": "Windows PowerShell",
                    "padding": "0, 0, 0, 0",
                    "snapOnInput": true,
                    "startingDirectory": "%USERPROFILE%",
                    "useAcrylic": false
                }
                ]
        }
    ]

I slapped a few things together for the mock up. If I have to go to the effort of adding in the keyboard shortcuts, I might as well be able to edit settings to define a custom layout.

All 7 comments

Out of curiosity, when you open a new tab with this profile, what do you expect to happen? Does it automatically create two panes, split vertically, with this profile? Does it create two panes, one with the default profile, and another with the given profile?

It seems to me like you're looking for the ability to open a pane with a specific profile. I personally use the following keybindings to great success:

        { "keys": [ "ctrl+alt+t" ], "command": { "action": "splitPane", "split":"auto", "splitMode": "duplicate" }  },
        { "keys": [ "ctrl+alt+z" ], "command": { "action": "splitPane", "profile": "Ubuntu 18.04", "split":"auto" } },
  • ctrl+alt+t Opens a new split with the current profile, with either a vertical or horizontal split (whichever gives it the most space)
  • ctrl+alt+z Opens a new split with my "Ubuntu 18.04" profile, with either a vertical or horizontal split (whichever gives it the most space)

I was just trying to figure out how to do this. Keybindings are fine, if I can remember what they are. I too would like an ability to define a profile with assigned split sections. Or let me run a WT command line that will open what I want in the existing WT instance.

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

I guess I'll speak for the original poster. I guess I'd like to see profile syntax that lets me specify an array of split panels including whether it is horizontal or vertical. It other words, the profile setting becomes an array of sub-panels. Maybe something like this:

   "profiles": [
        {
                "tabTitle": "PowerShell Panels",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "panels": [
                    {
                    "acrylicOpacity": 0.5,
                    "background": "#012456",
                    "closeOnExit": true,
                    "colorScheme": "Campbell",
                    "commandline": "powershell.exe -nologo",
                    "split": "horizontal",
                    "cursorColor": "#FFFFFF",
                    "cursorShape": "bar",
                    "fontFace": "Consolas",
                    "fontSize": 14,
                    "historySize": 9001,
                    "icon": "ms-appx:/// ProfileIcon s/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
                    "name": "Windows PowerShell",
                    "padding": "0, 0, 0, 0",
                    "snapOnInput": true,
                    "startingDirectory": "%USERPROFILE%",
                    "useAcrylic": false
                },
                {
                    "acrylicOpacity": 0.5,
                    "background": "#012456",
                    "closeOnExit": true,
                    "colorScheme": "Campbell",
                    "commandline": "pwsh -nologo",
                    "split": "auto",
                    "cursorColor": "#FFFFFF",
                    "cursorShape": "bar",
                    "fontFace": "Consolas",
                    "fontSize": 14,
                    "historySize": 9001,
                    "name": "Windows PowerShell",
                    "padding": "0, 0, 0, 0",
                    "snapOnInput": true,
                    "startingDirectory": "%USERPROFILE%",
                    "useAcrylic": false
                }
                ]
        }
    ]

I slapped a few things together for the mock up. If I have to go to the effort of adding in the keyboard shortcuts, I might as well be able to edit settings to define a custom layout.

Yes I agree. It needs to be customisable to every individual persons needs 馃槈

So, it turns out this is called out from #4632, the commandline scenario!

Add support for a profile to launch multiple panes using wt commands
Add support for running a set of wt commands on startup

I think the "ideal" way forward is to slowly deprecate (never kill!) defaultProfile and replace it with startupCommands or something similar, to let you specify "on startup, or on a profile launch, do new-tab;split-pane;split-pane;focus-tab -1"

I'm gonna mark this one, for now, as a /dup of #4632. Further discussion to follow -- let's get on that megathread and tease out some details.

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DieselMeister picture DieselMeister  路  3Comments

ghvanderweg picture ghvanderweg  路  3Comments

dev-logan picture dev-logan  路  3Comments

xmm1989218 picture xmm1989218  路  3Comments

carlos-zamora picture carlos-zamora  路  3Comments