Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings UI - unexpected profile sources handling and icon entry handling #9864

Closed
kellytrinh opened this issue Apr 17, 2021 · 4 comments
Closed
Labels
Area-Settings UI Anything specific to the SUI Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@kellytrinh
Copy link

kellytrinh commented Apr 17, 2021

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

  1. Profile is linked somehow to inbuilt "sources"

I run WSL1 side by side with WSL2 (WSL1 is my main and WSL2 for experimentation).

I launch WSL1 via custom profile ("wsl ~" to get me in home dir at startup and some custom titles etc). Disable the inbuilt sources:

    "disabledProfileSources": [
        "Windows.Terminal.Wsl"
]

With the line above, no auto entry for WSL1 or WSL2. (as expected)

when I comment out that line; new entry for WSL2 appears. Ok fine. But somehow, my custom profile WSL1 in settings UI becomes affected as well and settings UI says 'this cannot be deleted because automatically generated.

Not a biggie problem but very unexpected (expect seperate profile generated where all auto actions happen to that one not the one I have built)

  1. Icon handling is confusing.

When playing around with this one item I saw was that the inbuilt has a penguin icon (my custom had a default "C:>" icon)

This is exposed in settings UI has under icon entry "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png"

I copy that exact text and (after disable auto sources) put into my custom profile.

It doesn't work (presumably coz that is some magic link generated and not an actual icon file)

The Settings UI should be consistent where text inside the icon field of auto generated profiles can be used in custom profiles.

Steps to reproduce

.

Expected Behavior

No response

Actual Behavior

.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 17, 2021
@zadjii-msft
Copy link
Member

zadjii-msft commented Apr 19, 2021

Alright, so painfully, there are two issues in your post, so that makes it really hard to address them. Lets try one at a time.


Profile is linked somehow to inbuilt "sources"

Can you share your settings.json? I'm guessing that your WSL1 profile still has a source key set. Even if it's not automatically generated, we might be treating profiles where the user erroneously added a source as if they were dynamically generated.


Icon handling is confusing.

This might be another case of #9775. Apparently some settings are just not applying for some profiles for some users. It's unclear exactly as to why - my theory is that something weird is going on with the dynamic profiles. Seeing your entire settings file might help identify a root cause here.

@zadjii-msft zadjii-msft added Area-Settings UI Anything specific to the SUI Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 19, 2021
@kellytrinh
Copy link
Author

here is my settings.json

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    // Copy Paste Behaviour
    "copyFormatting": "all",
    "copyOnSelect": true,
	"multiLinePasteWarning": false,

    // Startup and window handling behaviour
    "startOnUserLogin": true,
    "startupActions": "new-tab -p \"Command Prompt\"; new-tab -p \"Ubuntu-18.04 WSL\"",
    "windowingBehavior": "useAnyExisting",

    // this is overriden by powertoys
    "initialPosition": "0,120",

    //  Profile handling
    "defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
    // Disable 
    "disabledProfileSources": 
    [
        "Windows.Terminal.Wsl",
        "Windows.Terminal.PowershellCore"
    ],

    // Add custom keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about keybindings, visit https://aka.ms/terminal-keybindings
	"keybindings":
	[
          // disable full screen  
//        {"command": "unbound", "keys" : "f11"},

        // extended profile opening
        { "command": { "action": "newTab", "index": 9 }, "keys": "ctrl+shift+0" },        
        { "command": { "action": "newTab", "index": 10 }, "keys": "ctrl+shift+-" },                
        { "command": { "action": "newTab", "index": 11 }, "keys": "ctrl+shift+=" },                


		// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
		// These two lines additionally bind them to Ctrl+C and Ctrl+V.
		// To learn more about selection, visit https://aka.ms/terminal-selection
		{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
		{ "command": "paste", "keys": "ctrl+v" },

		// Press Ctrl+Shift+F to open the search box
		{ "command": "find", "keys": "ctrl+shift+f" },

		// Press Alt+Shift+D to open a new pane.
		// - "split": "auto" makes this pane open in the direction that provides the most surface area.
		// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
		// To learn more about panes, visit https://aka.ms/terminal-panes
		{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" },


		// ============================================================
		// Custom Key Bindings
		// ============================================================

		// Close tab like Excel
		{ "command": "closePane", "keys": "ctrl+f4" },
		{ "command": "closePane", "keys": "alt+f4" },

		// Split screen with chosen terminal

		{ "command": { "action": "splitPane", "split": "auto", "index": 0 }, "keys": "ctrl+shift+q" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 1 }, "keys": "ctrl+shift+w" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 2 }, "keys": "ctrl+shift+e" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 3 }, "keys": "ctrl+shift+r" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 4 }, "keys": "ctrl+shift+t" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 5 }, "keys": "ctrl+shift+y" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 6 }, "keys": "ctrl+shift+u" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 7 }, "keys": "ctrl+shift+i" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 8 }, "keys": "ctrl+shift+o" },
		{ "command": { "action": "splitPane", "split": "auto", "index": 9 }, "keys": "ctrl+shift+p" },

		// Split screen with duplicate terminal in chosen direction
		{ "command": { "action": "splitPane", "split": "vertical",      "splitMode": "duplicate" }, "keys": "alt+shift+n" },
		{ "command": { "action": "splitPane", "split": "horizontal",    "splitMode": "duplicate" }, "keys": "alt+shift+m" },
		{ "command": { "action": "splitPane", "split": "auto",          "splitMode": "duplicate" }, "keys": "alt+shift+," }
	],
    "profiles": 
	{
		"defaults":
		{
		// ============================================================
		// Global
		// ============================================================
		// Put settings here that you want to apply to all profiles.


		"foreground"                    : "#FFFFFF",
        "background"                    : "#000000",
		"fontFace"                      : "Consolas",
		"suppressApplicationTitle"      : true,
        "bellStyle"                     : "visual",
		"cursorShape"                   : "vintage",
        "cursorColor"                   : "#EAD57F",
        "cursorHeight"                  : 30,
		},
		"list":
        [
            {
				// ============================================================
				// Cmd
				// ============================================================
				"guid"              : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
				"name"              : "Command Prompt",
				"tabTitle"          : "cmd",
				"commandline"       : "cmd.exe",
				"hidden"			: false,
				// Options
				"startingDirectory" : "%DROPBOX%\\userdata\\system"

            },
            {
				// ============================================================
				// Pi Hole
				// ============================================================
                "commandline": "wsl MOSH_ESCAPE_KEY=$'\\x11' mosh pihole",
                "guid": "{0caa0dad-35be-5f56-aaaa-192168005113}",
                "hidden": false,
                "name": "pihole",
                "tabTitle": "pihole"
            },
            {
				// ============================================================
				// IntelNUC
				// ============================================================

                "commandline": "wsl MOSH_ESCAPE_KEY=$'\\x11' mosh intelnuc /home/kelly/tmux.sh",
                "guid": "{0caa0dad-35be-5f56-aaaa-192168001104}",
                "hidden": false,
                "name": "IntelNUC",
                "tabTitle": "IntelNUC"
            },
            {
				// ============================================================
				// Core
				// ============================================================

                "commandline": "wsl MOSH_ESCAPE_KEY=$'\\x11' mosh core  /home/kelly/tmux.sh",
                "guid": "{0caa0dad-35be-5f56-aaaa-192168031190}",
                "hidden": false,
                "name": "Core",
                "tabTitle": "Core"
            },
            {
				// ============================================================
				// WSL1
				// ============================================================

                "commandline": "wsl.exe ~ /home/kelly/tmux.sh",
                "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
                "hidden": false,
                "name": "Ubuntu-18.04 WSL1",
                "tabTitle": "WSL_1"
            },
            {
				// ============================================================
				// WSL2
				// ============================================================

                "commandline": "wsl.exe ~ -d Ubuntu-20.04",
                "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c271}",
                "hidden": false,
                "name": "Ubuntu-20.04 WSL2",
                "tabTitle": "WSL_2"
            },
            {
				// ============================================================
				// Ultra 10
				// ============================================================
                "commandline": "wsl.exe ssh -p 8022 ultra-10",
                "guid": "{0caa0dad-35be-5f56-aaaa-100111125122}",
                "hidden": false,
                "name": "Ultra 10",
                "tabTitle": "Ultra 10"
            },
            {
				// ============================================================
				// Box mail server
				// ============================================================

                "commandline": "wsl.exe MOSH_ESCAPE_KEY=$'\\x11' mosh atlantic",
                "guid": "{0caa0dad-35be-5f56-a8ff-018140042071}",
                "hidden": false,
                "name": "box mail",
                "tabTitle": "box mail"
            },
            {
				// ============================================================
				// Powershell
				// ============================================================

                "colorScheme": "Campbell Powershell",
                "commandline": "powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell",
                "tabTitle": "Powershell"
            },
			{
				"guid"              : "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
				"hidden"            : false,
				"name"              : "Azure Cloud Shell",
				"source"            : "Windows.Terminal.Azure"
			}
		]
	},
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#3B78FF",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ]
	
}

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 19, 2021
@zadjii-msft
Copy link
Member

We've managed to track down a minimal repro of this. We're now tracking this in #9962. Thanks for the help!

/dup #9962

@ghost
Copy link

ghost commented Apr 26, 2021

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!

@ghost ghost closed this as completed Apr 26, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. labels Apr 26, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings UI Anything specific to the SUI Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants