-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Microsoft Terminal profile shortcut (#200)
* Add terminal profile option to Windows schema * Add Windows Terminal profile installer * Windows Terminal option is string only * Add tests * Add news item * Explicitly return None if profile location not found * Skip tests if profile settings file cannot found * Only import win_utils when platform is win * Apply suggestions from code review Co-authored-by: jaimergp <[email protected]> * Use indent=2 for test data * Add profile to all known Windows Terminal locations * Use typing.List for type declaration * Return empty list instead of None if profile locations are not found * Add overwrite warning * Update menuinst/platforms/win.py Co-authored-by: jaimergp <[email protected]> * Use tmp_path fixture * Ensure that terminal settings file always contains profiles list * Install Windows Terminal before running tests * Fix code formatting * Create a function for settings.json location to avoid duplication * Check for parent directory of settings file instead * Harden against changes in the terminal directory hash * Ensure that settings parent directory exists * Mock running as user Co-authored-by: jaimergp <[email protected]> --------- Co-authored-by: jaimergp <[email protected]>
- Loading branch information
1 parent
4dfcfe6
commit 416eaf9
Showing
9 changed files
with
198 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Enhancements | ||
|
||
* Add option to create a Windows Terminal profile. (#196 via #200) | ||
|
||
### Bug fixes | ||
|
||
* <news item> | ||
|
||
### Deprecations | ||
|
||
* <news item> | ||
|
||
### Docs | ||
|
||
* <news item> | ||
|
||
### Other | ||
|
||
* <news item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema", | ||
"$id": "https://schemas.conda.io/menuinst-1.schema.json", | ||
"menu_name": "Package", | ||
"menu_items": [ | ||
{ | ||
"name": "A", | ||
"description": "Package A", | ||
"icon": null, | ||
"command": [ | ||
"testcommand_a.exe" | ||
], | ||
"platforms": { | ||
"win": { | ||
"desktop": false, | ||
"quicklaunch": false, | ||
"terminal_profile": "A Terminal" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "B", | ||
"description": "Package B", | ||
"icon": null, | ||
"command": [ | ||
"testcommand_b.exe" | ||
], | ||
"platforms": { | ||
"win": { | ||
"desktop": false, | ||
"quicklaunch": false | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters