Commit Graph

63 Commits

Author SHA1 Message Date
Mike Griese 1fa3177f77
doc: add a link to MSYS2's WT profiles page (#8060) 2020-10-27 13:27:00 -07:00
Dustin L. Howett 5d823f538c
Replace the "user docs" with references to the real docs (#7649) 2020-09-17 09:38:01 -07:00
裴孟齐 c1df53f014
doc: fix a typo in user-docs/index.md (#5961) 2020-05-18 09:29:30 -07:00
Ryan Punt 122e4b8124
doc: add a link to default keybindings (#4614) 2020-05-14 16:53:34 -07:00
Igal Tabachnik 99037c968d
doc: add a tip about launching WT with a Win+Number shortcut (#5909) 2020-05-14 16:48:03 -07:00
Thomas c13d6f804a
doc: fix broken link within documentation (#5859) 2020-05-12 11:27:36 -07:00
uSlackr 1d72e771b5
Update docs to mention commandline args (#5765) 2020-05-06 12:08:18 -07:00
uSlackr fb08b6bf49
Add File Explorer tip to User Docs (#5752) 2020-05-05 09:50:27 -07:00
Mike Griese 48617b7e06
Add a note that the user needs to hide dynamic profiles (#5684)
Add a note that the user needs to hide dynamic profiles, not just delete them.

* [x] I work here
* [x] Is documentation.
* related to discussion in #3231
2020-05-04 15:04:09 -05:00
Anthony Vanelverdinghe 8a15b2f69b
doc: fix typo in UsingCommandlineArguments.md (#5714) 2020-05-02 23:33:10 -07:00
Marius Strom 37ff3f9f87
Updating to change from requestedTheme to theme (#5556)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Simple fix to update the example documentation with the recent changes to 0.11.
2020-04-27 08:57:46 -05:00
Mike Griese 757db46aa6
Remove last lingering references to profiles.json (#5534)
Literally just <kbd>ctrl+f</kbd> find-and-replace all the old `profiles.json` that are sitting around in the repo with `settings.json`. I didn't touch the specs, since it seemed better to leave them in the state that they were originally authored in.

* [x] closes #5522
* [x] I work here.
* [x] This is docs.
2020-04-24 21:29:33 +00:00
Mike Griese f6f0731eae
doc: Add note about using `;` as a separator in PowerShell (#5361)
This PR adds some notes from #4570 to the [UsingCommandlineArguments.md](https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingCommandlineArguments.md) doc. Hopefully, this should add clarity on how to use sub-commands in the `wt` commandline from within Powershell.

* [x] Closes #4570 
* [x] I work here
* [x] This is docs
2020-04-21 14:55:02 -07:00
Mike Griese 6995d0b2dc
doc: add a note about running `wt` in the current instance (#5448) 2020-04-21 13:45:18 -07:00
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
Mike Griese c1463bdbf0
doc: fix a typo in dynamic profiles (#5206) 2020-04-01 11:59:20 -07:00
Dustin L. Howett (MSFT) cd9e854553
Remove a heap of legacy settings deserialization (#5190)
This commit removes support for:

* legacy keybindings of all types
* `colorScheme.colors`, as an array
* A `globals` object in the root of the settings file
* `profile.colorTable` and `profile.colorscheme` (the rare v0.1 all-lowercase variety)

Fixes #4091.
Fixes #1069.
2020-03-31 13:58:28 -07:00
Chester Liu 91b84f185e
doc: add Git Bash(WOW64) to ThirdPartyToolProfiles (#5141) 2020-03-27 16:18:10 -07:00
Chester Liu 5e9adad2a8
Doc: add Developer Command Prompt for VS profile (#5142) 2020-03-27 13:53:30 -07:00
Mike Griese 8c4ca4683b
Add a note about binding multiple keys (#5015)
* Add a note about Binding multiple keys

From discussion in #4992

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Josh Soref <jsoref@users.noreply.github.com>

* update the comment here to be a little clearer

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2020-03-27 10:51:32 -05:00
Josh Soref 5de9fa9cf3
ci: run spell check in CI, fix remaining issues (#4799)
This commit introduces a github action to check our spelling and fixes
the following misspelled words so that we come up green.

It also renames TfEditSes to TfEditSession, because Ses is not a word.

currently, excerpt, fallthrough, identified, occurred, propagate,
provided, rendered, resetting, separate, succeeded, successfully,
terminal, transferred, adheres, breaks, combining, preceded,
architecture, populated, previous, setter, visible, window, within,
appxmanifest, hyphen, control, offset, powerpoint, suppress, parsing,
prioritized, aforementioned, check in, build, filling, indices, layout,
mapping, trying, scroll, terabyte, vetoes, viewport, whose
2020-03-25 11:02:53 -07:00
Dominik Bartsch 7250469dd5
doc: add cmder icon to ThirdPartyToolProfiles (#5107) 2020-03-24 14:14:12 -07:00
Christoph Kröppl 03f805cc0a
doc: add MSYS2 profile to ThirdPartyToolProfiles.md (#5077) 2020-03-23 10:30:52 -07:00
Mike Griese ca8d101740
doc: remove unimplemented `-t` arg from `split-pane` (#4888)
Fixes #4878
2020-03-11 10:50:34 -07:00
Abhijeet Viswam e596943ed2
Make ctrl+shift+scroll toggle acrylic on/off at extrema (#4853)
If UseAcrylic is disabled, CTRL+SHIFT+SCROLL would enable it, without
having to change the setting in profile.json manually.

1. Set "useAcrylic" to false for the any profile in profile.json
2. Open terminal window for that profile.
3. CTRL+SHIFT+MouseScroll
   Acrylic background opacity should change according to mouse scroll

## PR Checklist
* [x] CLA signed.
* [x] Tested manually
* [x] Updated documentation

Closes #661
2020-03-11 10:48:58 -07:00
Kevin Ireland 2d707f102b
Fix JSON syntax errors in UsingJsonSettings.md (#4784)
Fixes #4783.
2020-03-02 19:44:38 -08:00
Prajwal Adhikari 4608fd0b94
doc: add a tip about opening terminal in current directory (#4658) 2020-02-28 15:40:02 -08:00
Carlos Zamora a97048a798
Accept String value for Keybindings's Keys (#4714)
## Summary of the Pull Request

`keys` in `keybindings` now accepts a string value. This assumes that you wanted a keychord of size 1. The schema and user docs were properly updated too.

This means that the following keybinding is now accepted in your profiles.json:
```json
{ "command": "copy", "keys": "ctrl+c" }
```
as opposed to...
```json
{ "command": "copy", "keys": [ "ctrl+c" ] }
```

## PR Checklist
* [X] Closes #4713
* [X] CLA signed.
* [X] Tests added/passed
* [X] Requires documentation to be updated


## Validation Steps Performed
- [X] tested the new schema
- [X] added test
2020-02-27 20:53:31 +00:00
Fernando de Oliveira c54f59b3c5
doc: fix double quotes on cmder and Anaconda profiles (#4617) 2020-02-18 10:43:50 -08:00
Ryan Punt 9df9bd00d7
Add linting fixes for markdown (#4615)
VSCode's markdown linter suggested a pile of fixes
2020-02-18 09:20:03 -08:00
Vítězslav Ackermann Ferko 4634a68a9b
doc: add useAcrylic unfocused limitation to docs (#4412) 2020-02-10 16:09:48 -08:00
Josh Soref a13ccfd0f5
Fix a bunch of spelling errors across the project (#4295)
Generated by https://github.com/jsoref/spelling `f`; to maintain your repo, please consider `fchurn`

I generally try to ignore upstream bits. I've accidentally included some items from the `deps/` directory. I expect someone will give me a list of items to drop, I'm happy to drop whole files/directories, or to split the PR into multiple items (E.g. comments/locals/public).

Closes #4294
2020-02-10 20:40:01 +00:00
David Haymond 46b70d824d
doc: correct spelling error in UsingJsonSettings.md (#4518) 2020-02-10 10:43:15 -08:00
Richard Holliday d3aa56cb36
Update index.md - Tips and Tricks (#4451)
pwsh parent process has been changed, confirmations in the replies to the referenced tweet.

<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Description
Updating documentation to reflect changes in pwsh parent process.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [x] Requires documentation to be updated
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2020-02-04 09:54:06 -06:00
Dustin L. Howett (MSFT) 3487664cb0
Configure CLI11 to stuff all unknown positionals into the cmdli… (#4388)
This commit fixes an issue where "wt -d C: wsl -d Alpine" would be
parsed as "wt -d C: -d Alpine wsl" and rejected as invalid due to the
repeated -d. It also fixes support for the option parsing terminator,
--, in all command lines.

Fixes #4277.
2020-01-29 13:01:05 -08:00
Mike Griese 830c22b73e Add support for commandline args to `wt.exe` (#4023)
## Summary of the Pull Request

Adds support for commandline arguments to the Windows Terminal, in accordance with the spec in #3495

## References

* Original issue: #607
* Original spec: #3495

## PR Checklist
* [x] Closes #607
* [x] I work here
* [x] Tests added/passed
* [ ] We should probably add some docs on these commands
* [x] The spec (#3495) needs to be merged first!

## Detailed Description of the Pull Request / Additional comments

🛑 **STOP** 🛑 - have you read #3495 yet? If you haven't, go do that now.

This PR adds support for three initial sub-commands to the `wt.exe` application:
* `new-tab`: Used to create a new tab.
* `split-pane`: Used to create a new split.
* `focus-tab`: Moves focus to another tab.

These commands are largely POC to prove that the commandlines work. They're not totally finished, but they work well enough. Follow up work items will be filed to track adding support for additional parameters and subcommands

Important scenarios added:
* `wt -d .`: Open a new wt instance in the current working directory #878
* `wt -p <profile name>`: Create a wt instance running the given profile, to unblock  #576, #1357, #2339
* `wt ; new-tab ; split-pane -V`: Launch the terminal with multiple tabs, splits, to unblock #756 

## Validation Steps Performed

* Ran tests
* Played with it a bunch
2020-01-27 15:34:12 +00:00
vtabota 6d6fb7f690 doc: include FAR in ThirdPartyToolProfiles.md (#4242) 2020-01-15 15:35:18 -08:00
Mike Griese 8b2189f6f0 Add a note regarding unbinding keys (#4084) 2019-12-30 10:08:30 -08:00
IBRAHIM SAMAD 6cff0435ae doc: fix a typo in the default settings discussion (#3980)
This change fixed a typo with the grammatical construct in the sentence.
2019-12-17 10:13:28 -08:00
Mike Griese 3ccc999e1f Add support for "User Default" settings II (#3892)
## Summary of the Pull Request

_This is attempt 2 at this feature_. The original PR can be found at #3369. 

These are settings that apply to _every_ profile, before user customizations. 

If the user wants to add "default profile settings", they can make the `"profiles"` property an _object_, instead of a list, and add `"defaults"` key underneath that object. The users list of profiles should then be under the `list` property of the `profiles` object.

## References
#2515, #2603, #3369, #3569

## PR Checklist
* [x] Closes #2325
* [x] I work here
* [x] Tests added/passed
* [x] schema, docs updated

## Detailed Description of the Pull Request / Additional comments
~~Discussion in #2325 itself serves as the "spec" for this task. I thought we'd need more discussion on the topic, but it ended up being pretty straightforward.~~

I should not have said that in the original PR. We've had a better spec review now that I think we're happier with.

## Validation Steps Performed
_ran the tests_
2019-12-11 00:39:29 +00:00
Mike Griese d2dcdef620
Create a doc for adding common third-party tools (#3353)
* Create a doc for adding common third-party tools

Maybe it would be helpful to have a comprehensive guide on adding some common third-party tools as profiles.

* add some additional tools from PR
2019-11-06 15:14:43 -06:00
Mike Griese f0c110593a Add a note on using WSL paths to user docs (#3405)
* Add a note on using WSL paths to documentation

Co-Authored-By: greg904 <56923875+greg904@users.noreply.github.com>
Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>
2019-11-06 11:19:43 -08:00
Rahul Thakare 581d63fa8d Added <kbd> notations for keyboard keys. (#2975)
* Added <kbd> notations for keyboard keys.
2019-10-31 09:53:38 -07:00
Martin Lopes aa682bfd12 doc: update the path to profiles.json (#3087)
This path is consistently `WindowsTerminal_8wekyb3d8bbwe`.
2019-10-08 10:36:53 -07:00
Martin Lopes 9756c7c3f7 doc: update section Starting Windows Terminal (#2998)
* Edits doc section: Starting Windows Terminal
* Proposes using the search function to locate the app.
* Restructures as a procedure.
* Adds misc edits.
* Made step 1 more generic, rather than prescribing the search method.
* Added tip about shortcut for elevated app

[skip ci]
2019-10-03 16:33:02 -07:00
Mike Griese 23bea9e5b5 doc: add note on dynamic profile GUIDs (#2938) 2019-09-27 14:50:02 -07:00
Carlos Zamora 0df6415e5b
Update Docs on "Copy" Operation (#2799) 2019-09-27 11:07:59 -07:00
Gage Ames b096a57387 Update path to profiles.json in documentation (#2843)
The profiles.json file was moved from RoamingState to LocalState in
PR #2298. Update the documentation to reflect this change.
2019-09-23 09:15:47 -07:00
Martin Lopes fe6fa04f15 Edits doc section `Installing Windows Terminal` (#2728)
* Edits doc section `Installing Windows Terminal`

* Adds some light edits throughout.
* Adds link to `winver` documentation.

* Adds link to Microsoft Store listing

Updates procedure to link to https://aka.ms/install-terminal
2019-09-17 08:47:17 -07:00
Mike Griese 8ba8f35dc5
Add Cascading User + Default Settings (#2515)
This PR represents the start of the work on Cascading User + default settings, #754.

Cascading settings will be done in two parts: 
* [ ] Layered Default+User settings (this PR)
* [ ] Dynamic Profile Generation (#2603).

Until _both_ are done, _neither are going in. The dynamic profiles PR will target this PR when it's ready, but will go in as a separate commit into master.

This PR covers adding one primary feature: the settings are now in two separate files:
* a static `defaults.json` that ships with the package (the "default settings")
* a `profiles.json` with the user's customizations (the "user settings)

User settings are _layered_ upon the settings in the defaults settings.

## References

Other things that might be related here:
* #1378 - This seems like it's definitely fixed. The default keybindings are _much_ cleaner, and without the save-on-load behavior, the user's keybindings will be left in a good state 
* #1398 - This might have honestly been solved by #2475 

## PR Checklist
* [x] Closes #754
* [x] Closes #1378 
* [x] Closes #2566
* [x] I work here
* [x] Tests added/passed
* [x] Requires documentation to be updated - it **ABSOLUTELY DOES**


## Detailed Description of the Pull Request / Additional comments

1. We start by taking all of the `FromJson` functions in Profile, ColorScheme, Globals, etc, and converting them to `LayerJson` methods. These are effectively the same, with the change that instead of building a new object, they are simply layering the values on top of `this` object. 
2. Next, we add tests for layering properties like that.
3. Now, we add a `defaults.json` to the package. This is the file the users can refer to as our default settings.
4. We then take that `defaults.json` and stamp it into an auto generated `.h` file, so we can use it's data without having to worry about reading it from disk.
5. We then change the `LoadAll` function in `CascadiaSettings`. Now, the function does two loads - one from the defaults, and then a second load from the `profiles.json` file, layering the settings from each source upon the previous values.
6. If the `profiles.json` file doesn't exist, we'll create it from a hardcoded `userDefaults.json`, which is stamped in similar to how `defaults.json` is.
7. We also add support for _unbinding_ keybindings that might exist in the `defaults.json`, but the user doesn't want to be bound to anything.
8. We add support for _hiding_ a profile, which is useful if a user doesn't want one of the default profiles to appear in the list of profiles.

## TODO:
* [x] Still need to make Alt+Click work on the settings button
* [x] Need to write some user documentation on how the new settings model works
* [x] Fix the pair of tests I broke (re: Duplicate profiles)


<hr>

* Create profiles by layering them

* Update test to layer multiple times on the same profile

* Add support for layering an array of profiles, but break a couple tests

* Add a defaults.json to the package

* Layer colorschemes

  * Moves tests into individual classes
  * adds support for layering a colorscheme on top of another

* Layer an array of color schemes

* oh no, this was missed with #2481

  must have committed without staging this change, uh oh. Not like those tests actually work so nbd

* Layer keybindings

* Read settings from defaults.json + profiles.json, layer appropriately

  This is like 80% of #754. Needs tests.

* Add tests for keybindings

  * add support to unbind a key with `null` or `"unbound"` or `"garbage"`

* Layer or clear optional properties

* Add a helper to get an optional variable for a bunch of different types

  In the end, I think we need to ask _was this worth it_

* Do this with the stretch mode too

* Add back in the GUID check for profiles

* Add some tests for global settings layering

* M A D  W I T H  P O W E R

  Add a MsBuild target to auto-generate a header with the defaults.json as a
  string in the file. That way, we can _always_ load the defaults. Literally impossible to not.

* When the user's profile.json doesn't exist, create it from a template

* Re-order profiles to match the order set in the user's profiles.json

* Add tests for re-ordering profiles to match user ordering

* Add support for hiding profiles using `"hidden": true`

* Use the hardcoded defaults.json for the exception->"use defaults" case

* Somehow I messed up the git submodules?

* woo documentation

* Fix a Terminal.App.Unit.Tests failure

* signed/unsigned is hard

* Use Alt+Settings button to open the default settings

* Missed a signed/unsigned

* Some very preliminary PR feedback

* More PR feedback

  Use the wil helper for the exe path
  Move jsonutils into their own file
  kill some dead code

* Add templates to these bois

* remove some code for generating defaults, reorder defaults.json a tad

* Make guid a std::optional

* Large block of PR feedback

  * Remove some dead code
  * add some comments
  * tag some todos

* stl is love, stl is life

* add `-noprofile`

* Fix the crash that dustin found

* -Encoding ASCII

* Set a profile's default scheme to Campbell

* Fix the tests I regressed

* Update UsingJsonSetting.md to reflect that changes from these PRs

* Change how GenerateGuidForProfile works

* Make AppKeyBindings do its own serialization

* Remove leftover dead code from the previous commit

* Fix up an enormous number of PR nits

* Fix a typo; Update the defaults to match #2378

* Tiny nits

* Some typos, PR nits

* Fix this broken defaults case
2019-09-16 12:57:10 -07:00