Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto detect background image docs #155

Merged
merged 6 commits into from
Nov 10, 2020
Merged

Auto detect background image docs #155

merged 6 commits into from
Nov 10, 2020

Conversation

bennettnicholas
Copy link

@bennettnicholas bennettnicholas commented Oct 7, 2020

Added documentation to profile-setting.md for the setting "backgroundImage" to accept "DesktopWallpaper" as a way to mimic the desktops wallpaper as the terminals background image.

Documentation for microsoft/terminal#7295

*I am a student and this is my first pull request for Terminal so please give feedback no matter how small. It's the best way I can learn.

@opbld33
Copy link

opbld33 commented Oct 7, 2020

Docs Build status updates of commit 315e0b7:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/profile-settings.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld33
Copy link

opbld33 commented Oct 7, 2020

Docs Build status updates of commit 79d8203:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/profile-settings.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld33
Copy link

opbld33 commented Oct 7, 2020

Docs Build status updates of commit 6707809:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/profile-settings.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld31
Copy link

opbld31 commented Oct 7, 2020

Docs Build status updates of commit 717875c:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/profile-settings.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

ghost pushed a commit to microsoft/terminal that referenced this pull request Oct 15, 2020
##  Summary of the Pull Request
Added watch on desktopImagePath to check when the path equals "DesktopWallpaper"
If it does equal "DesktopWallpaper" it replaces the path with a path to the desktop's wallpaper

*I am a student and this is my first pull request for Terminal so please give feedback no matter how small. It's the best way I can learn.

## PR Checklist
* [X] Closes #7295 
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [?] Tests added/passed
* [X] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: MicrosoftDocs/terminal#155
* [?] Schema updated. (Not sure if this is needed, also not sure where this would be)
* [X] 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: #7295 (Have only talked with the people on the issue, which I don't think has any core contributors)

## Detailed Description of the Pull Request / Additional comments
I am using SystemParametersInfo for SPI_GETDESKWALLPAPER which puts the path into a WCHAR and that is then inserted as the BackgroundImagePath.

I do not think an additional test would add value. The SPI_GETDESKTOPWALLPAPER uses the computers local wallpaper path and puts it into a WCHAR, which then I feed into BackgroundImagePath() as it's new path. I don't think there adds value in making a static path of the desktop background and testing that, given that static tests are already done for "BackgroundImage()".

## Validation Steps Performed

(Manual Validation - Test False Value)
1. Ran Terminal
2. Set setting ["backgroundImage": "<some random img path>"] under profiles->defaults
3. Verified terminal's background is not the desktops wallpaper. 

(Manual Validation - Test True Value)
1. Ran Terminal
2. Set setting ["backgroundImage": "DesktopWallpaper"] under profiles->defaults
3. Verified the background image matches the desktop background image. 

(Manual Validation - Multiple Tabs True Value)
1. Ran Terminal
2. Set setting ["backgroundImage": "DesktopWallpaper"] under profiles->defaults
3. Verified the background image matches the desktop background image.  
4. Opened new tabs
5. Verified the background image matches the desktop background image for each tab.
@bennettnicholas
Copy link
Author

@cinnamon-msft Hey could you look over these changes? If I remember correctly you wrote a few of these.

@cinnamon-msft cinnamon-msft changed the base branch from master to release-1.5 November 10, 2020 22:48
@cinnamon-msft cinnamon-msft merged commit 49c85a6 into MicrosoftDocs:release-1.5 Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants