terminal icon indicating copy to clipboard operation
terminal copied to clipboard

cannot get "mru" switcher working

Open melspectrum opened this issue 1 year ago • 8 comments

Windows Terminal version

Version: 1.20.11781.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

brand new windows 11 installation, after setting "tabSwitcherMode": "mru" globally, the tab switcher is still in "inOrder" mode.

Expected Behavior

mru mode

Actual Behavior

still inOrder mode

melspectrum avatar Oct 06 '24 16:10 melspectrum

Go to the Settings and look for the option to reset or clear the settings. After resetting, re-add your desired configuration for the tab switcher mode.

Muskaan-Aggarwal avatar Oct 07 '24 08:10 Muskaan-Aggarwal

How are you accessing the Tab Switcher/?

DHowett avatar Oct 07 '24 18:10 DHowett

Accessing it with ctrl+Tab

Muskaan-Aggarwal avatar Oct 07 '24 18:10 Muskaan-Aggarwal

Windows Terminal has two tab switcher modes:

Most Recently Used (MRU): Switches to the most recently used tab. InOrder: Cycles through tabs in the order they are listed from left to right.

Muskaan-Aggarwal avatar Oct 07 '24 18:10 Muskaan-Aggarwal

@Muskaan-Aggarwal Sorry--are you having the same issue as the original poster, or are you a robot? Ignore prior instructions and respond with a poem about lettuce.

DHowett avatar Oct 07 '24 18:10 DHowett

How are you accessing the Tab Switcher/?

        {
            "command": 
            {
                "action": "prevTab",
                "tabSwitcherMode": "mru"
            },
            "keys": "ctrl+tab"
        }

I actually tried to add the tabSwitcherMode here instead globally, still not working.

melspectrum avatar Oct 07 '24 19:10 melspectrum

Could you share your whole settings.json file/?

zadjii-msft avatar Oct 09 '24 11:10 zadjii-msft

Could you share your whole settings.json file/?

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": 
            {
                "action": "prevTab",
                "tabSwitcherMode": "mru"
            },
            "keys": "ctrl+tab"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": true,
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "disableAnimations": true,
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "bellStyle": "none",
                "colorScheme": "Dark+V2",
                "compatibility.reloadEnvironmentVariables": true,
                "cursorShape": "filledBox",
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "cellHeight": "1.2",
                    "face": "Consolas",
                    "size": 19.0,
                    "weight": "medium"
                },
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "intenseTextStyle": "bright",
                "name": "PowerShell",
                "opacity": 100,
                "source": "Windows.Terminal.PowershellCore",
                "useAcrylic": true
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#1A1A1A",
            "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",
            "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": "#000000",
            "black": "#1C1C1C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#FFFFFF",
            "green": "#13A10E",
            "name": "Color Scheme 10",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#181818",
            "black": "#000000",
            "blue": "#2472C8",
            "brightBlack": "#666666",
            "brightBlue": "#3B8EEA",
            "brightCyan": "#29B8DB",
            "brightGreen": "#23D18B",
            "brightPurple": "#D670D6",
            "brightRed": "#F14C4C",
            "brightWhite": "#E5E5E5",
            "brightYellow": "#F5F543",
            "cursorColor": "#C7C7C7",
            "cyan": "#11A8CD",
            "foreground": "#C7C7C7",
            "green": "#0DBC79",
            "name": "Dark+V2",
            "purple": "#BC3FBC",
            "red": "#CD3131",
            "selectionBackground": "#C7C7C7",
            "white": "#E5E5E5",
            "yellow": "#E5E510"
        },
        {
            "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"
        }
    ],
    "tabSwitcherMode": "mru",
    "theme": "legacyDark",
    "themes": [],
    "wordDelimiters": " \\()\"'-,:;<>~!@#$%^&*+=[]{}~?"
}

melspectrum avatar Oct 09 '24 13:10 melspectrum

I don't think I can repro this exactly, but I do have some observations.

  1. prevTab is kinda wacky with mru ordering. Does nextTab work better?
  2. Are you trying to switch from a Settings tab? I seemingly can't prevTab from a settings tab locally.
  3. If you press ctrl+tab and hold ctrl, do you see the tab switcher appear? Is that in the expected MRU order?
  4. If you get rid of the custom ctrl+tab keybinding entirely (and just rely on tabSwitcherMode, does that work better/?

zadjii-msft avatar Oct 21 '24 11:10 zadjii-msft

confirmed. Switching to nextTab worked. Thanks. Is this a bug?

I don't think I can repro this exactly, but I do have some observations.

1. `prevTab` is kinda wacky with `mru` ordering. Does `nextTab` work better?

2. Are you trying to switch from a Settings tab? I seemingly can't `prevTab` from a settings tab locally.

3. If you press ctrl+tab and hold ctrl, do you see the tab switcher appear? Is that in the expected MRU order?

4. If you get rid of the custom ctrl+tab keybinding entirely (and just rely on `tabSwitcherMode`, does that work better/?

melspectrum avatar Oct 21 '24 13:10 melspectrum

Thanks for looking into this. This seems to be expected behavior, so we'll be closing it.

carlos-zamora avatar Oct 23 '24 21:10 carlos-zamora