terminal/src/cascadia/TerminalApp
Dustin L. Howett (MSFT) 64489b1ec1
rename profiles.json to settings.json, clean up the defaults (#5199)
This pull request migrates `profiles.json` to `settings.json` and removes the legacy roaming AppData settings migrator.

It also:

* separates the key bindings in defaults.json into logical groups
* syncs the universal terminal defaults with the primary defaults
* removes some stray newlines that ended up at the beginning of settings.json and defaults.json

Fixes #5186.
Fixes #3291.

### categorize key bindings

### sync universal with main

### kill stray newlines in template files

### move profiles.json to settings.json

This commit also changes Get*Settings from returning a string to
returning a std::filesystem::path. We gain in expressiveness without a
loss in clarity (since path still supports .c_str()).

NOTE: I tried to do an atomic rename with the handle open, but it didn't
work for reparse points (it moves the destination of a symbolic link
out into the settings folder directly.)

(snip for atomic rename code)

```c++
auto path{ pathToSettingsFile.wstring() };
auto renameBufferSize{ sizeof(FILE_RENAME_INFO) + (path.size() * sizeof(wchar_t)) };
auto renameBuffer{ std::make_unique<std::byte[]>(renameBufferSize) };
auto renameInfo{ reinterpret_cast<FILE_RENAME_INFO*>(renameBuffer.get()) };
renameInfo->Flags = FILE_RENAME_FLAG_REPLACE_IF_EXISTS | FILE_RENAME_FLAG_POSIX_SEMANTICS;
renameInfo->RootDirectory = nullptr;
renameInfo->FileNameLength = gsl::narrow_cast<DWORD>(path.size());
std::copy(path.cbegin(), path.cend(), std::begin(renameInfo->FileName));

THROW_IF_WIN32_BOOL_FALSE(SetFileInformationByHandle(hLegacyFile.get(),
                          FileRenameInfo,
                          renameBuffer.get(),
                          gsl::narrow_cast<DWORD>(renameBufferSize)));
```

(end snip)

### Stop resurrecting dead roaming profiles
2020-04-01 19:09:42 +00:00
..
lib Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
Resources/en-US Convert the About and Close All Tabs dialogs to xaml (#5140) 2020-03-27 21:00:32 +00:00
ActionAndArgs.cpp Add support for arbitrary args in keybindings (#3391) 2019-11-14 16:23:40 -06:00
ActionAndArgs.h Add support for arbitrary args in keybindings (#3391) 2019-11-14 16:23:40 -06:00
ActionArgs.cpp Add support for new panes with specifc profiles and other settings overrides (#3825) 2019-12-09 13:02:29 +00:00
ActionArgs.h Use an Automatic split for splitPane by default (#5194) 2020-04-01 00:59:31 +00:00
ActionArgs.idl Add a splitPane option to duplicate current profile (#4683) 2020-03-06 23:15:45 +00:00
App.base.h Apply a GDI region to the top level Island window to allow dragging with a single Island (#929) 2019-06-25 13:06:11 -07:00
App.cpp Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
App.h Break everything out of App except Xaml platform init (#3465) 2019-11-07 13:10:58 -08:00
App.idl Break everything out of App except Xaml platform init (#3465) 2019-11-07 13:10:58 -08:00
App.xaml Round and style buttons on close all tabs dialog (#4401) 2020-01-30 15:51:43 -08:00
AppActionHandlers.cpp Add a splitPane option to duplicate current profile (#4683) 2020-03-06 23:15:45 +00:00
AppCommandlineArgs.cpp Use an Automatic split for splitPane by default (#5194) 2020-04-01 00:59:31 +00:00
AppCommandlineArgs.h Configure CLI11 to stuff all unknown positionals into the cmdli… (#4388) 2020-01-29 13:01:05 -08:00
AppKeyBindings.cpp Encapsulate dispatching ShortcutActions in it's own class (#3658) 2019-11-27 15:51:38 -06:00
AppKeyBindings.h Add warning messages for bad keybindings (#4746) 2020-03-05 21:06:58 +00:00
AppKeyBindings.idl Encapsulate dispatching ShortcutActions in it's own class (#3658) 2019-11-27 15:51:38 -06:00
AppKeyBindingsSerialization.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
AppLogic.cpp rename profiles.json to settings.json, clean up the defaults (#5199) 2020-04-01 19:09:42 +00:00
AppLogic.h Prevent tab reordering while elevated (#4874) 2020-03-11 15:52:09 +00:00
AppLogic.idl Prevent tab reordering while elevated (#4874) 2020-03-11 15:52:09 +00:00
AzureCloudShellGenerator.cpp Implement ConnectionState and closeOnExit=graceful/always/never (#3623) 2019-11-25 14:22:29 -08:00
AzureCloudShellGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
CascadiaSettings.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
CascadiaSettings.h rename profiles.json to settings.json, clean up the defaults (#5199) 2020-04-01 19:09:42 +00:00
CascadiaSettingsSerialization.cpp rename profiles.json to settings.json, clean up the defaults (#5199) 2020-04-01 19:09:42 +00:00
ColorScheme.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
ColorScheme.h Add cursorColor to color scheme (#4651) 2020-03-17 20:11:03 +00:00
Commandline.cpp Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
Commandline.h Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
DebugTapConnection.cpp Add a "debug tap" that lets you see the VT behind a connection (#5127) 2020-03-26 15:33:47 -07:00
DebugTapConnection.h Add a "debug tap" that lets you see the VT behind a connection (#5127) 2020-03-26 15:33:47 -07:00
DefaultProfileUtils.cpp Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
DefaultProfileUtils.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
defaults-universal.json rename profiles.json to settings.json, clean up the defaults (#5199) 2020-04-01 19:09:42 +00:00
defaults.json rename profiles.json to settings.json, clean up the defaults (#5199) 2020-04-01 19:09:42 +00:00
FixVisualStudioBug.targets Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
GlobalAppSettings.cpp Add a "debug tap" that lets you see the VT behind a connection (#5127) 2020-03-26 15:33:47 -07:00
GlobalAppSettings.h Add a "debug tap" that lets you see the VT behind a connection (#5127) 2020-03-26 15:33:47 -07:00
IDynamicProfileGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
IF7Listener.idl Tunnel F7 keypresses directly into special handlers in TermControl (#4807) 2020-03-05 20:35:46 +00:00
init.cpp Introduce a WinRT utils library and "checked resources" (#3350) 2019-11-01 15:47:05 -07:00
JsonUtils.cpp Gracefully handle json data with the wrong value types (#4961) 2020-03-20 20:35:51 +00:00
JsonUtils.h Gracefully handle json data with the wrong value types (#4961) 2020-03-20 20:35:51 +00:00
KeyChordSerialization.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
KeyChordSerialization.h Support remapping keybindings (#748) 2019-05-21 09:26:04 -05:00
LegacyProfileGeneratorNamespaces.h Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
MinMaxCloseControl.cpp Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
MinMaxCloseControl.h Propagate window style changes to the titlebar and minmax (#3025) 2019-10-02 10:27:07 -07:00
MinMaxCloseControl.idl Propagate window style changes to the titlebar and minmax (#3025) 2019-10-02 10:27:07 -07:00
MinMaxCloseControl.xaml Polish AutomationProperties and UIA Tree Navigation (#4805) 2020-03-05 22:32:46 +00:00
packages.config deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
Pane.cpp Process actions sync. on startup; don't dupe nonexistent profile (#5090) 2020-03-25 17:03:32 -07:00
Pane.h Process actions sync. on startup; don't dupe nonexistent profile (#5090) 2020-03-25 17:03:32 -07:00
Pane.LayoutSizeNode.cpp Snap to character grid when resizing window (#3181) 2020-01-08 13:19:23 -08:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
PowershellCoreProfileGenerator.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
PowershellCoreProfileGenerator.h Collect all known PowerShell Core installations for dynamic profiles (#4273) 2020-01-31 04:17:21 +00:00
Profile.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
Profile.h Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
ShortcutActionDispatch.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
ShortcutActionDispatch.h Search - add search box control and implement search experience (#3590) 2019-12-17 15:52:37 +00:00
ShortcutActionDispatch.idl Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
Tab.cpp Process actions sync. on startup; don't dupe nonexistent profile (#5090) 2020-03-25 17:03:32 -07:00
Tab.h Process actions sync. on startup; don't dupe nonexistent profile (#5090) 2020-03-25 17:03:32 -07:00
Tab.idl Convert Tab to a WinRT type (#4350) 2020-02-04 21:51:11 +00:00
TabRowControl.cpp Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.h Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.idl Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.xaml Polish AutomationProperties and UIA Tree Navigation (#4805) 2020-03-05 22:32:46 +00:00
TelnetGenerator.h Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
TerminalApp.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalApp.vcxproj deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
TerminalPage.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
TerminalPage.h Convert the About and Close All Tabs dialogs to xaml (#5140) 2020-03-27 21:00:32 +00:00
TerminalPage.idl Convert the About and Close All Tabs dialogs to xaml (#5140) 2020-03-27 21:00:32 +00:00
TerminalPage.xaml Convert the About and Close All Tabs dialogs to xaml (#5140) 2020-03-27 21:00:32 +00:00
TerminalWarnings.h Add warning messages for bad keybindings (#4746) 2020-03-05 21:06:58 +00:00
TitlebarControl.cpp Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
TitlebarControl.h Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TitlebarControl.idl Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TitlebarControl.xaml Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
userDefaults.json Update stock user defaults to the list+defaults style (#4556) 2020-02-13 00:12:18 +00:00
Utils.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
Utils.h Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
WslDistroGenerator.cpp Force WslDistroGenerator to timeout after 10s and return Profiles (#4905) 2020-03-16 18:14:25 +00:00
WslDistroGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00