mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-07 14:50:55 +00:00
Add a pile of 'experimental' settings to the profile SUI (#16809)
As noted in #3337, we never actually added this menu to the settings. Since we're planning on taking this out of "experimental" in 1.21, we should have a visible setting for it too.
This commit is contained in:
@@ -333,7 +333,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// (The window has a min. size that ensures that there's always a scrollbar thumb.)
|
||||
if (drawableRange < 0)
|
||||
{
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +302,18 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
return Feature_VtPassthroughMode::IsEnabled() && Feature_VtPassthroughModeSettingInUI::IsEnabled();
|
||||
}
|
||||
bool ProfileViewModel::ShowMarksAvailable() const noexcept
|
||||
{
|
||||
return Feature_ScrollbarMarks::IsEnabled();
|
||||
}
|
||||
bool ProfileViewModel::AutoMarkPromptsAvailable() const noexcept
|
||||
{
|
||||
return Feature_ScrollbarMarks::IsEnabled();
|
||||
}
|
||||
bool ProfileViewModel::RepositionCursorWithMouseAvailable() const noexcept
|
||||
{
|
||||
return Feature_ScrollbarMarks::IsEnabled();
|
||||
}
|
||||
|
||||
bool ProfileViewModel::UseParentProcessDirectory()
|
||||
{
|
||||
|
||||
@@ -81,7 +81,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
bool ShowUnfocusedAppearance();
|
||||
void CreateUnfocusedAppearance();
|
||||
void DeleteUnfocusedAppearance();
|
||||
|
||||
bool VtPassthroughAvailable() const noexcept;
|
||||
bool ShowMarksAvailable() const noexcept;
|
||||
bool AutoMarkPromptsAvailable() const noexcept;
|
||||
bool RepositionCursorWithMouseAvailable() const noexcept;
|
||||
|
||||
til::typed_event<Editor::ProfileViewModel, Editor::DeleteProfileEventArgs> DeleteProfileRequested;
|
||||
|
||||
@@ -115,6 +119,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, Elevate);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, VtPassthrough);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, ReloadEnvironmentVariables);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, RightClickContextMenu);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, ShowMarks);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, AutoMarkPrompts);
|
||||
OBSERVABLE_PROJECTED_SETTING(_profile, RepositionCursorWithMouse);
|
||||
|
||||
WINRT_PROPERTY(bool, IsBaseLayer, false);
|
||||
WINRT_PROPERTY(bool, FocusDeleteButton, false);
|
||||
|
||||
@@ -74,7 +74,11 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
Boolean EditableUnfocusedAppearance { get; };
|
||||
Boolean ShowUnfocusedAppearance { get; };
|
||||
AppearanceViewModel UnfocusedAppearance { get; };
|
||||
|
||||
Boolean VtPassthroughAvailable { get; };
|
||||
Boolean ShowMarksAvailable { get; };
|
||||
Boolean AutoMarkPromptsAvailable { get; };
|
||||
Boolean RepositionCursorWithMouseAvailable { get; };
|
||||
|
||||
String EvaluatedIcon { get; };
|
||||
|
||||
@@ -109,5 +113,9 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, Elevate);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, VtPassthrough);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ReloadEnvironmentVariables);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RightClickContextMenu);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ShowMarks);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AutoMarkPrompts);
|
||||
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RepositionCursorWithMouse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,35 @@
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- RightClickContextMenu -->
|
||||
<local:SettingContainer x:Uid="Profile_RightClickContextMenu"
|
||||
ClearSettingValue="{x:Bind Profile.ClearRightClickContextMenu}"
|
||||
HasSettingValue="{x:Bind Profile.HasRightClickContextMenu, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Profile.RightClickContextMenuOverrideSource, Mode=OneWay}">
|
||||
<ToggleSwitch IsOn="{x:Bind Profile.RightClickContextMenu, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- ShowMarks -->
|
||||
<local:SettingContainer x:Uid="Profile_ShowMarks"
|
||||
ClearSettingValue="{x:Bind Profile.ClearShowMarks}"
|
||||
HasSettingValue="{x:Bind Profile.HasShowMarks, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Profile.ShowMarksOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind Profile.ShowMarksAvailable}">
|
||||
<ToggleSwitch IsOn="{x:Bind Profile.ShowMarks, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- AutoMarkPrompts -->
|
||||
<local:SettingContainer x:Uid="Profile_AutoMarkPrompts"
|
||||
ClearSettingValue="{x:Bind Profile.ClearAutoMarkPrompts}"
|
||||
HasSettingValue="{x:Bind Profile.HasAutoMarkPrompts, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Profile.AutoMarkPromptsOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind Profile.AutoMarkPromptsAvailable}">
|
||||
<ToggleSwitch IsOn="{x:Bind Profile.AutoMarkPrompts, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- ReloadEnvVars -->
|
||||
<local:SettingContainer x:Uid="Profile_ReloadEnvVars"
|
||||
ClearSettingValue="{x:Bind Profile.ClearReloadEnvironmentVariables}"
|
||||
@@ -135,6 +164,17 @@
|
||||
<ToggleSwitch IsOn="{x:Bind Profile.ReloadEnvironmentVariables, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- RepositionCursorWithMouse -->
|
||||
<local:SettingContainer x:Uid="Profile_RepositionCursorWithMouse"
|
||||
ClearSettingValue="{x:Bind Profile.ClearRepositionCursorWithMouse}"
|
||||
HasSettingValue="{x:Bind Profile.HasRepositionCursorWithMouse, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Profile.RepositionCursorWithMouseOverrideSource, Mode=OneWay}"
|
||||
Visibility="{x:Bind Profile.RepositionCursorWithMouseAvailable}">
|
||||
<ToggleSwitch IsOn="{x:Bind Profile.RepositionCursorWithMouse, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1218,6 +1218,38 @@
|
||||
<value>Enable experimental virtual terminal passthrough</value>
|
||||
<comment>An option to enable experimental virtual terminal passthrough connectivity option with the underlying ConPTY</comment>
|
||||
</data>
|
||||
<data name="Profile_RightClickContextMenu.Header" xml:space="preserve">
|
||||
<value>Display a menu on right-click</value>
|
||||
<comment>This controls how a right-click behaves in the terminal</comment>
|
||||
</data>
|
||||
<data name="Profile_RightClickContextMenu.HelpText" xml:space="preserve">
|
||||
<value>When enabled, the Terminal will display a menu on right-click. When disabled, right-clicking will copy the selected text (or paste if there's no selection).</value>
|
||||
<comment>A description for what the "Display a menu on right-click" setting does. Presented near "Profile_RightClickContextMenu".</comment>
|
||||
</data>
|
||||
<data name="Profile_ShowMarks.Header" xml:space="preserve">
|
||||
<value>Display marks on the scrollbar</value>
|
||||
<comment>"Marks" are small visual indicators that can help the user identify the position of useful info in the scrollbar</comment>
|
||||
</data>
|
||||
<data name="Profile_ShowMarks.HelpText" xml:space="preserve">
|
||||
<value>When enabled, the Terminal will display marks in the scrollbar when searching for text, or when shell integration is enabled.</value>
|
||||
<comment>A description for what the "Display marks on the scrollbar" setting does. Presented near "Profile_ShowMarks".</comment>
|
||||
</data>
|
||||
<data name="Profile_AutoMarkPrompts.Header" xml:space="preserve">
|
||||
<value>Automatically mark prompts on pressing Enter</value>
|
||||
<comment>"Enter" is the enter/return key on the keyboard. This will add a mark indicating the position of a shell prompt when the user presses enter.</comment>
|
||||
</data>
|
||||
<data name="Profile_AutoMarkPrompts.HelpText" xml:space="preserve">
|
||||
<value>When enabled, the Terminal automatically add a mark indicating the position of the end of the command when you press enter.</value>
|
||||
<comment>A description for what the "Automatically mark prompts on pressing Enter" setting does. Presented near "Profile_AutoMarkPrompts".</comment>
|
||||
</data>
|
||||
<data name="Profile_RepositionCursorWithMouse.Header" xml:space="preserve">
|
||||
<value>Experimental: Reposition the cursor with mouse clicks</value>
|
||||
<comment>This allows the user to move the text cursor just by clicking with the mouse.</comment>
|
||||
</data>
|
||||
<data name="Profile_RepositionCursorWithMouse.HelpText" xml:space="preserve">
|
||||
<value>When enabled, clicking inside the prompt will move the cursor to that position. This requires shell integration to be enabled in your shell to work as expected.</value>
|
||||
<comment>A description for what the "Reload environment variables" setting does. Presented near "Profile_RepositionCursorWithMouse".</comment>
|
||||
</data>
|
||||
<data name="Profile_BellStyleAudible.Content" xml:space="preserve">
|
||||
<value>Audible</value>
|
||||
<comment>An option to choose from for the "bell style" setting. When selected, an audible cue is used to notify the user.</comment>
|
||||
|
||||
Reference in New Issue
Block a user