2020-08-28 05:49:16 +02:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
import "ColorScheme.idl";
|
2020-09-14 22:38:56 +02:00
|
|
|
import "KeyMapping.idl";
|
2020-08-28 05:49:16 +02:00
|
|
|
import "Command.idl";
|
|
|
|
|
2020-10-06 18:56:59 +02:00
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
2020-08-28 05:49:16 +02:00
|
|
|
{
|
|
|
|
// MIDL 3 allows for structs to hold nullable types
|
|
|
|
// Though IReference is a WinRT object, MIDL 3
|
|
|
|
// handles all of the ownership logic for us.
|
|
|
|
// Docs: https://docs.microsoft.com/en-us/uwp/midl-3/intro#types
|
|
|
|
struct LaunchPosition
|
|
|
|
{
|
|
|
|
Windows.Foundation.IReference<Int64> X;
|
|
|
|
Windows.Foundation.IReference<Int64> Y;
|
|
|
|
};
|
|
|
|
|
2020-10-06 18:56:59 +02:00
|
|
|
enum LaunchMode
|
|
|
|
{
|
|
|
|
DefaultMode,
|
|
|
|
MaximizedMode,
|
|
|
|
FullscreenMode,
|
2020-10-15 00:19:51 +02:00
|
|
|
FocusMode,
|
|
|
|
MaximizedFocusMode,
|
2020-10-06 18:56:59 +02:00
|
|
|
};
|
|
|
|
|
2020-11-05 15:28:16 +01:00
|
|
|
enum TabSwitcherMode
|
|
|
|
{
|
|
|
|
MostRecentlyUsed,
|
|
|
|
InOrder,
|
|
|
|
Disabled,
|
|
|
|
};
|
|
|
|
|
2021-02-19 22:09:17 +01:00
|
|
|
enum WindowingMode
|
|
|
|
{
|
|
|
|
UseNew,
|
|
|
|
UseAnyExisting,
|
|
|
|
UseExisting,
|
|
|
|
};
|
|
|
|
|
2020-08-28 05:49:16 +02:00
|
|
|
[default_interface] runtimeclass GlobalAppSettings {
|
|
|
|
Guid DefaultProfile;
|
2020-10-27 18:35:09 +01:00
|
|
|
Boolean HasUnparsedDefaultProfile();
|
|
|
|
void ClearUnparsedDefaultProfile();
|
|
|
|
String UnparsedDefaultProfile;
|
2020-08-28 05:49:16 +02:00
|
|
|
|
2020-10-27 18:35:09 +01:00
|
|
|
Boolean HasInitialRows();
|
|
|
|
void ClearInitialRows();
|
2020-08-28 05:49:16 +02:00
|
|
|
Int32 InitialRows;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasInitialCols();
|
|
|
|
void ClearInitialCols();
|
2020-08-28 05:49:16 +02:00
|
|
|
Int32 InitialCols;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasAlwaysShowTabs();
|
|
|
|
void ClearAlwaysShowTabs();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean AlwaysShowTabs;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasShowTitleInTitlebar();
|
|
|
|
void ClearShowTitleInTitlebar();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean ShowTitleInTitlebar;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasConfirmCloseAllTabs();
|
|
|
|
void ClearConfirmCloseAllTabs();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean ConfirmCloseAllTabs;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasTheme();
|
|
|
|
void ClearTheme();
|
2020-08-28 05:49:16 +02:00
|
|
|
Windows.UI.Xaml.ElementTheme Theme;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasTabWidthMode();
|
|
|
|
void ClearTabWidthMode();
|
2020-08-28 05:49:16 +02:00
|
|
|
Microsoft.UI.Xaml.Controls.TabViewWidthMode TabWidthMode;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasShowTabsInTitlebar();
|
|
|
|
void ClearShowTabsInTitlebar();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean ShowTabsInTitlebar;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasWordDelimiters();
|
|
|
|
void ClearWordDelimiters();
|
2020-08-28 05:49:16 +02:00
|
|
|
String WordDelimiters;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasCopyOnSelect();
|
|
|
|
void ClearCopyOnSelect();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean CopyOnSelect;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasCopyFormatting();
|
|
|
|
void ClearCopyFormatting();
|
2020-08-28 05:49:16 +02:00
|
|
|
Microsoft.Terminal.TerminalControl.CopyFormat CopyFormatting;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasWarnAboutLargePaste();
|
|
|
|
void ClearWarnAboutLargePaste();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean WarnAboutLargePaste;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasWarnAboutMultiLinePaste();
|
|
|
|
void ClearWarnAboutMultiLinePaste();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean WarnAboutMultiLinePaste;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasInitialPosition();
|
|
|
|
void ClearInitialPosition();
|
2020-08-28 05:49:16 +02:00
|
|
|
LaunchPosition InitialPosition;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
Add `centerOnLaunch` setting (#9036)
This PR is a resurrection of #8414. @Hegunumo has apparently deleted
their account, but the contribution was still valuable. I'm just here to
get it across the finish line.
This PR adds new global setting `centerOnLaunch`. When set to `true`,
the Terminal window will be centered on the display it opens on.
So the interactions are like:
* `initialPos: x,y`, `centered: true`, `launchMode: default`
center on the monitor that x,y is on
* `initialPos: x,y`, `centered: true`, `launchMode: maximized`
maximized on the monitor that x,y is on (centered adds nothing)
* `initialPos: <omitted>`, `centered: true`, `launchMode: default`
center on the default monitor
* `initialPos: <omitted>`, `centered: true`, `launchMode: focus`
center, focus mode on the default monitor
* `initialPos: <omitted>`, `centered: true`, `launchMode: maximized`
maximized on the default monitor (centered adds nothing)
## Validation Steps Performed
I've played with it on multiple different monitors, and it seems to work
on all of them.
Closes #8414 (original PR)
Closes #7722
Co-authored-by: Kiminori Kaburagi <yukawa_hidenori@icloud.com>
2021-02-19 23:30:24 +01:00
|
|
|
Boolean HasCenterOnLaunch();
|
|
|
|
void ClearCenterOnLaunch();
|
|
|
|
Boolean CenterOnLaunch;
|
|
|
|
|
2020-10-27 18:35:09 +01:00
|
|
|
Boolean HasLaunchMode();
|
|
|
|
void ClearLaunchMode();
|
2020-08-28 05:49:16 +02:00
|
|
|
LaunchMode LaunchMode;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasSnapToGridOnResize();
|
|
|
|
void ClearSnapToGridOnResize();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean SnapToGridOnResize;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasForceFullRepaintRendering();
|
|
|
|
void ClearForceFullRepaintRendering();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean ForceFullRepaintRendering;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasSoftwareRendering();
|
|
|
|
void ClearSoftwareRendering();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean SoftwareRendering;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasForceVTInput();
|
|
|
|
void ClearForceVTInput();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean ForceVTInput;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasDebugFeaturesEnabled();
|
|
|
|
void ClearDebugFeaturesEnabled();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean DebugFeaturesEnabled;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasStartOnUserLogin();
|
|
|
|
void ClearStartOnUserLogin();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean StartOnUserLogin;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasAlwaysOnTop();
|
|
|
|
void ClearAlwaysOnTop();
|
2020-08-28 05:49:16 +02:00
|
|
|
Boolean AlwaysOnTop;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
2020-11-05 15:28:16 +01:00
|
|
|
Boolean HasTabSwitcherMode();
|
|
|
|
void ClearTabSwitcherMode();
|
|
|
|
TabSwitcherMode TabSwitcherMode;
|
2020-10-27 18:35:09 +01:00
|
|
|
|
|
|
|
Boolean HasDisableAnimations();
|
|
|
|
void ClearDisableAnimations();
|
2020-10-10 01:06:40 +02:00
|
|
|
Boolean DisableAnimations;
|
2020-08-28 05:49:16 +02:00
|
|
|
|
2020-09-14 22:38:56 +02:00
|
|
|
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
2020-08-28 05:49:16 +02:00
|
|
|
void AddColorScheme(ColorScheme scheme);
|
2020-12-18 00:14:07 +01:00
|
|
|
void RemoveColorScheme(String schemeName);
|
2020-08-28 05:49:16 +02:00
|
|
|
|
2020-09-14 22:38:56 +02:00
|
|
|
KeyMapping KeyMap();
|
2020-08-28 05:49:16 +02:00
|
|
|
|
2020-09-14 22:38:56 +02:00
|
|
|
Windows.Foundation.Collections.IMapView<String, Command> Commands();
|
2021-01-15 19:30:11 +01:00
|
|
|
|
|
|
|
Boolean HasStartupActions();
|
|
|
|
void ClearStartupActions();
|
|
|
|
String StartupActions();
|
2021-02-09 23:18:20 +01:00
|
|
|
|
|
|
|
Boolean HasFocusFollowMouse();
|
|
|
|
void ClearFocusFollowMouse();
|
|
|
|
Boolean FocusFollowMouse;
|
2021-02-19 22:09:17 +01:00
|
|
|
|
|
|
|
Boolean HasWindowingBehavior();
|
|
|
|
void ClearWindowingBehavior();
|
|
|
|
WindowingMode WindowingBehavior;
|
2020-08-28 05:49:16 +02:00
|
|
|
}
|
|
|
|
}
|