🧼 PowerToys Awake (#11593)

* Scrubbing name conventions

* Fix naming for projects

* Fix folder naming

* More folder cleanup

* More left-over file changes

* Reverting LCL files, because these will be handled by the loc team

* Remove legacy file that is no longer used.

* Update latest
This commit is contained in:
Den Delimarsky 2021-06-09 09:13:58 -07:00 committed by GitHub
parent c9c54b7780
commit c5e464a704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 272 additions and 271 deletions

View File

@ -142,6 +142,7 @@ autoplay
Autorun Autorun
AUTOSIZECOLUMNS AUTOSIZECOLUMNS
autoupdate autoupdate
awakeversion
AValid AValid
AWAYMODE AWAYMODE
azurecr azurecr
@ -628,7 +629,6 @@ errorlevel
ERRORMESSAGE ERRORMESSAGE
ERRORTITLE ERRORTITLE
esize esize
espressoversion
estdir estdir
etcore etcore
etl etl

View File

@ -81,13 +81,14 @@ build:
- 'modules\ColorPicker\Microsoft.PowerToys.Settings.UI.Lib.dll' - 'modules\ColorPicker\Microsoft.PowerToys.Settings.UI.Lib.dll'
- 'modules\ColorPicker\PowerToysInterop.dll' - 'modules\ColorPicker\PowerToysInterop.dll'
- 'modules\ColorPicker\Telemetry.dll' - 'modules\ColorPicker\Telemetry.dll'
- 'modules\Espresso\EspressoModuleInterface.dll' - '**\*.resources.dll'
- 'modules\Espresso\ManagedCommon.dll' - 'modules\Awake\AwakeModuleInterface.dll'
- 'modules\Espresso\ManagedTelemetry.dll' - 'modules\Awake\ManagedCommon.dll'
- 'modules\Espresso\Microsoft.PowerToys.Settings.UI.Lib.dll' - 'modules\Awake\ManagedTelemetry.dll'
- 'modules\Espresso\PowerToys.Espresso.exe' - 'modules\Awake\Microsoft.PowerToys.Settings.UI.Lib.dll'
- 'modules\Espresso\PowerToys.Espresso.dll' - 'modules\Awake\PowerToys.Awake.exe'
- 'modules\Espresso\PowerToysInterop.dll' - 'modules\Awake\PowerToys.Awake.dll'
- 'modules\Awake\PowerToysInterop.dll'
- 'modules\FancyZones\fancyzones.dll' - 'modules\FancyZones\fancyzones.dll'
- 'modules\FancyZones\FancyZonesEditor.exe' - 'modules\FancyZones\FancyZonesEditor.exe'
- 'modules\FancyZones\FancyZonesEditor.dll' - 'modules\FancyZones\FancyZonesEditor.dll'

View File

@ -63,7 +63,7 @@ PowerRename is from Chris's SmartRename and icon rendering for SVGs in File Expl
### [@dend](https://github.com/dend/) - Den Delimarsky ### [@dend](https://github.com/dend/) - Den Delimarsky
PowerToys Espresso is a tool to keep your computer awake PowerToys Awake is a tool to keep your computer awake.
### [@martinchrzan](https://github.com/martinchrzan/) - Martin Chrzan ### [@martinchrzan](https://github.com/martinchrzan/) - Martin Chrzan

View File

@ -102,7 +102,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerExt", "src\modu
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageResizerUITest", "src\modules\imageresizer\tests\ImageResizerUITest.csproj", "{E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageResizerUITest", "src\modules\imageresizer\tests\ImageResizerUITest.csproj", "{E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ActionRunner", "src\ActionRunner\ActionRunner.vcxproj", "{D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerToys.ActionRunner", "src\ActionRunner\ActionRunner.vcxproj", "{D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{17DA04DF-E393-4397-9CF0-84DABE11032E} = {17DA04DF-E393-4397-9CF0-84DABE11032E} {17DA04DF-E393-4397-9CF0-84DABE11032E} = {17DA04DF-E393-4397-9CF0-84DABE11032E}
EndProjectSection EndProjectSection
@ -328,15 +328,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorLibrar
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", "src\modules\keyboardmanager\KeyboardManagerEditorTest\KeyboardManagerEditorTest.vcxproj", "{62173D9A-6724-4C00-A1C8-FB646480A9EC}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", "src\modules\keyboardmanager\KeyboardManagerEditorTest\KeyboardManagerEditorTest.vcxproj", "{62173D9A-6724-4C00-A1C8-FB646480A9EC}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{127F38E0-40AA-4594-B955-5616BF206882}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "awake", "awake", "{127F38E0-40AA-4594-B955-5616BF206882}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AwakeModuleInterface", "src\modules\awake\AwakeModuleInterface\AwakeModuleInterface.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Awake", "src\modules\awake\Awake\Awake.csproj", "{D940E07F-532C-4FF3-883F-790DA014F19A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Community.PowerToys.Run.Plugin.UnitConverter", "src\modules\launcher\Plugins\Community.PowerToys.Run.Plugin.UnitConverter\Community.PowerToys.Run.Plugin.UnitConverter.csproj", "{BB23A474-5058-4F75-8FA3-5FE3DE53CDF4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Community.PowerToys.Run.Plugin.UnitConverter", "src\modules\launcher\Plugins\Community.PowerToys.Run.Plugin.UnitConverter\Community.PowerToys.Run.Plugin.UnitConverter.csproj", "{BB23A474-5058-4F75-8FA3-5FE3DE53CDF4}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EspressoModuleInterface", "src\modules\espresso\EspressoModuleInterface\EspressoModuleInterface.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Community.PowerToys.Run.Plugin.UnitConverter.UnitTest", "src\modules\launcher\Plugins\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest.csproj", "{3E424AD2-19E5-4AE6-B833-F53963EB5FC1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Community.PowerToys.Run.Plugin.UnitConverter.UnitTest", "src\modules\launcher\Plugins\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest.csproj", "{3E424AD2-19E5-4AE6-B833-F53963EB5FC1}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso\Espresso.csproj", "{D940E07F-532C-4FF3-883F-790DA014F19A}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shortcutguide", "shortcutguide", "{106CBECA-0701-4FC3-838C-9DF816A19AE2}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shortcutguide", "shortcutguide", "{106CBECA-0701-4FC3-838C-9DF816A19AE2}"
EndProject EndProject

View File

@ -19,7 +19,7 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
| [Color Picker](https://aka.ms/PowerToysOverview_ColorPicker) | [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) | | [Color Picker](https://aka.ms/PowerToysOverview_ColorPicker) | [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) |
| [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) | [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) | | [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) | [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) |
| [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Video Conference Mute (Experimental)](https://aka.ms/PowerToysOverview_VideoConference) | | [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Video Conference Mute (Experimental)](https://aka.ms/PowerToysOverview_VideoConference) |
| Espresso (Coming soon in 0.39) | | | | Awake (Coming soon in 0.39) | | |
## Installing and running Microsoft PowerToys ## Installing and running Microsoft PowerToys
### Requirements ### Requirements

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -8,7 +8,7 @@
<?define KeyboardManagerProjectName="KeyboardManager"?> <?define KeyboardManagerProjectName="KeyboardManager"?>
<?define PowerRenameProjectName="PowerRename"?> <?define PowerRenameProjectName="PowerRename"?>
<?define ColorPickerProjectName="ColorPicker"?> <?define ColorPickerProjectName="ColorPicker"?>
<?define EspressoProjectName="Espresso"?> <?define AwakeProjectName="Awake"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?> <?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?> <?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
@ -220,13 +220,13 @@
</Directory> </Directory>
<Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview" /> <Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview" />
<Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" /> <Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" />
<Directory Id="EspressoInstallFolder" Name="$(var.EspressoProjectName)"> <Directory Id="AwakeInstallFolder" Name="$(var.AwakeProjectName)">
<Directory Id="EspressoInstallFolderRuntimes" Name="Runtimes"> <Directory Id="AwakeInstallFolderRuntimes" Name="Runtimes">
<Directory Id="EspressoInstallFolderRuntimesWin" Name="Win"> <Directory Id="AwakeInstallFolderRuntimesWin" Name="Win">
<Directory Id="EspressoInstallFolderRuntimesWinLib" Name="Lib"> <Directory Id="AwakeInstallFolderRuntimesWinLib" Name="Lib">
<Directory Id="EspressoInstallFolderNetcoreApp21" Name="netcoreapp2.1" /> <Directory Id="AwakeInstallFolderNetcoreApp21" Name="netcoreapp2.1" />
<Directory Id="EspressoInstallFolderNetcoreApp30" Name="netcoreapp3.0" /> <Directory Id="AwakeInstallFolderNetcoreApp30" Name="netcoreapp3.0" />
<Directory Id="EspressoInstallFolderNetStandard20" Name="netstandard2.0" /> <Directory Id="AwakeInstallFolderNetStandard20" Name="netstandard2.0" />
</Directory> </Directory>
</Directory> </Directory>
</Directory> </Directory>
@ -678,35 +678,35 @@
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<!-- Espresso --> <!-- Awake -->
<DirectoryRef Id="EspressoInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)"> <DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)">
<Component Id="Module_Espresso" Guid="F26F5780-5B38-43B2-BC21-8406ED6E2071" Win64="yes"> <Component Id="Module_Awake" Guid="F26F5780-5B38-43B2-BC21-8406ED6E2071" Win64="yes">
<?foreach File in EspressoModuleInterface.dll;ManagedCommon.dll;ManagedTelemetry.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;Microsoft.Win32.Registry.dll;Microsoft.Win32.SystemEvents.dll;NLog.config;NLog.dll;PowerToys.Espresso.deps.json;PowerToys.Espresso.dll;PowerToys.Espresso.exe;PowerToys.Espresso.runtimeconfig.json;PowerToysInterop.dll;System.CommandLine.dll;System.Configuration.ConfigurationManager.dll;System.Drawing.Common.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Security.AccessControl.dll;System.Security.Cryptography.ProtectedData.dll;System.Security.Permissions.dll;System.Security.Principal.Windows.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;System.Windows.Extensions.dll?> <?foreach File in AwakeModuleInterface.dll;ManagedCommon.dll;ManagedTelemetry.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;Microsoft.Win32.Registry.dll;Microsoft.Win32.SystemEvents.dll;NLog.config;NLog.dll;PowerToys.Awake.deps.json;PowerToys.Awake.dll;PowerToys.Awake.exe;PowerToys.Awake.runtimeconfig.json;PowerToysInterop.dll;System.CommandLine.dll;System.Configuration.ConfigurationManager.dll;System.Drawing.Common.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Security.AccessControl.dll;System.Security.Cryptography.ProtectedData.dll;System.Security.Permissions.dll;System.Security.Principal.Windows.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;System.Windows.Extensions.dll?>
<File Id="EspressoFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\$(var.File)" /> <File Id="AwakeFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="EspressoInstallFolderNetStandard20" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0"> <DirectoryRef Id="AwakeInstallFolderNetStandard20" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0">
<Component Id="Module_Espresso_runtime_netstandard20" Guid="414A31AB-91A8-4F17-9B4B-DB7B93A2BB23"> <Component Id="Module_Awake_runtime_netstandard20" Guid="414A31AB-91A8-4F17-9B4B-DB7B93A2BB23">
<File Id="EspressoFile_runtime_Microsoft.Win32.Registry.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0\Microsoft.Win32.Registry.dll" /> <File Id="AwakeFile_runtime_Microsoft.Win32.Registry.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\Microsoft.Win32.Registry.dll" />
<File Id="EspressoFile_runtime_System.Runtime.Caching.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll" /> <File Id="AwakeFile_runtime_System.Runtime.Caching.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll" />
<File Id="EspressoFile_runtime_System.Security.AccessControl.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0\System.Security.AccessControl.dll" /> <File Id="AwakeFile_runtime_System.Security.AccessControl.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\System.Security.AccessControl.dll" />
<File Id="EspressoFile_runtime_System.Security.Cryptography.ProtectedData.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" /> <File Id="AwakeFile_runtime_System.Security.Cryptography.ProtectedData.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" />
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="EspressoInstallFolderNetcoreApp30" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp3.0"> <DirectoryRef Id="AwakeInstallFolderNetcoreApp30" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0">
<Component Id="Module_Espresso_runtime_netcoreapp30" Guid="1EBB21FE-083A-4AE6-9208-7DC72A421860"> <Component Id="Module_Awake_runtime_netcoreapp30" Guid="1EBB21FE-083A-4AE6-9208-7DC72A421860">
<File Id="EspressoFile_runtime_Microsoft.Win32.SystemEvents.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp3.0\Microsoft.Win32.SystemEvents.dll" /> <File Id="AwakeFile_runtime_Microsoft.Win32.SystemEvents.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0\Microsoft.Win32.SystemEvents.dll" />
<File Id="EspressoFile_runtime_System.Drawing.Common.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll" /> <File Id="AwakeFile_runtime_System.Drawing.Common.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll" />
<File Id="EspressoFile_runtime_System.Windows.Extensions.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp3.0\System.Windows.Extensions.dll" /> <File Id="AwakeFile_runtime_System.Windows.Extensions.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0\System.Windows.Extensions.dll" />
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="EspressoInstallFolderNetcoreApp21" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp2.1"> <DirectoryRef Id="AwakeInstallFolderNetcoreApp21" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp2.1">
<Component Id="Module_Espresso_runtime_netcoreapp21" Guid="52ED2831-6F3F-47D3-AA1A-88C697BE9D0F"> <Component Id="Module_Awake_runtime_netcoreapp21" Guid="52ED2831-6F3F-47D3-AA1A-88C697BE9D0F">
<File Id="EspressoFile_runtime_System.Security.Principal.Windows.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp2.1\System.Security.Principal.Windows.dll" /> <File Id="AwakeFile_runtime_System.Security.Principal.Windows.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp2.1\System.Security.Principal.Windows.dll" />
</Component> </Component>
</DirectoryRef> </DirectoryRef>
@ -787,21 +787,21 @@
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="SettingsV2AssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules"> <DirectoryRef Id="SettingsV2AssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules">
<Component Id="SettingsV2AssetsModules" Guid="A0B961A9-77D0-4223-88A9-E3B41BD9C329" Win64="yes"> <Component Id="SettingsV2AssetsModules" Guid="A0B961A9-77D0-4223-88A9-E3B41BD9C329" Win64="yes">
<?foreach File in ColorPicker.png;FancyZones.png;Espresso.png;ImageResizer.png;KBM.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ShortcutGuide.png?> <?foreach File in ColorPicker.png;FancyZones.png;Awake.png;ImageResizer.png;KBM.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ShortcutGuide.png?>
<File Id="SettingsV2AssetsModules_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\Modules\$(var.File)" /> <File Id="SettingsV2AssetsModules_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\Modules\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="SettingsV2OOBEAssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules\OOBE"> <DirectoryRef Id="SettingsV2OOBEAssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules\OOBE">
<Component Id="SettingsV2OOBEAssetsModules" Guid="E2360A83-6694-4B33-B5F6-641A906359EE" Win64="yes"> <Component Id="SettingsV2OOBEAssetsModules" Guid="E2360A83-6694-4B33-B5F6-641A906359EE" Win64="yes">
<?foreach File in ColorPicker.gif;Espresso.png;FancyZones.gif;FileExplorer.png;ImageResizer.gif;KBM.gif;PowerRename.gif;Run.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?> <?foreach File in ColorPicker.gif;Awake.png;FancyZones.gif;FileExplorer.png;ImageResizer.gif;KBM.gif;PowerRename.gif;Run.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?>
<File Id="SettingsV2OOBEAssetsModules_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\Modules\OOBE\$(var.File)" /> <File Id="SettingsV2OOBEAssetsModules_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\Modules\OOBE\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="SettingsV2OOBEAssetsFluentIconsInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\FluentIcons"> <DirectoryRef Id="SettingsV2OOBEAssetsFluentIconsInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\FluentIcons">
<Component Id="SettingsV2OOBEAssetsFluentIcons" Guid="6A380D5A-DA63-45B5-B68F-06D57CDD1B9C" Win64="yes"> <Component Id="SettingsV2OOBEAssetsFluentIcons" Guid="6A380D5A-DA63-45B5-B68F-06D57CDD1B9C" Win64="yes">
<?foreach File in ColorPicker.png;FancyZones.png;Espresso.png;FileExplorerPreview.png;ImageResizer.png;KeyboardManager.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ShortcutGuide.png;VideoConferenceMute.png ?> <?foreach File in ColorPicker.png;FancyZones.png;Awake.png;FileExplorerPreview.png;ImageResizer.png;KeyboardManager.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ShortcutGuide.png;VideoConferenceMute.png ?>
<File Id="SettingsV2OOBEAssetsFluentIcons_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\FluentIcons\FluentIcons$(var.File)" /> <File Id="SettingsV2OOBEAssetsFluentIcons_$(var.File)" Source="$(var.BinX64Dir)Settings\Assets\FluentIcons\FluentIcons$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
@ -889,10 +889,10 @@
<ComponentRef Id="Module_KeyboardManager_Engine" /> <ComponentRef Id="Module_KeyboardManager_Engine" />
<ComponentRef Id="Module_ColorPicker" /> <ComponentRef Id="Module_ColorPicker" />
<ComponentRef Id="Module_ColorPicker_Resources"/> <ComponentRef Id="Module_ColorPicker_Resources"/>
<ComponentRef Id="Module_Espresso"/> <ComponentRef Id="Module_Awake"/>
<ComponentRef Id="Module_Espresso_runtime_netstandard20"/> <ComponentRef Id="Module_Awake_runtime_netstandard20"/>
<ComponentRef Id="Module_Espresso_runtime_netcoreapp30"/> <ComponentRef Id="Module_Awake_runtime_netcoreapp30"/>
<ComponentRef Id="Module_Espresso_runtime_netcoreapp21"/> <ComponentRef Id="Module_Awake_runtime_netcoreapp21"/>
<ComponentRef Id="SettingsV2" /> <ComponentRef Id="SettingsV2" />
<ComponentRef Id="SettingsV2Assets" /> <ComponentRef Id="SettingsV2Assets" />
<ComponentRef Id="SettingsV2AssetsModules" /> <ComponentRef Id="SettingsV2AssetsModules" />

View File

@ -13,7 +13,7 @@ struct LogSettings
inline const static std::wstring actionRunnerLogPath = L"RunnerLogs\\action-runner-log.txt"; inline const static std::wstring actionRunnerLogPath = L"RunnerLogs\\action-runner-log.txt";
inline const static std::string launcherLoggerName = "launcher"; inline const static std::string launcherLoggerName = "launcher";
inline const static std::wstring launcherLogPath = L"LogsModuleInterface\\launcher-log.txt"; inline const static std::wstring launcherLogPath = L"LogsModuleInterface\\launcher-log.txt";
inline const static std::wstring espressoLogPath = L"Logs\\espresso-log.txt"; inline const static std::wstring awakeLogPath = L"Logs\\awake-log.txt";
inline const static std::string fancyZonesLoggerName = "fancyzones"; inline const static std::string fancyZonesLoggerName = "fancyzones";
inline const static std::wstring fancyZonesLogPath = L"fancyzones-log.txt"; inline const static std::wstring fancyZonesLogPath = L"fancyzones-log.txt";
inline const static std::wstring fancyZonesOldLogPath = L"FancyZonesLogs\\"; // needed to clean up old logs inline const static std::wstring fancyZonesOldLogPath = L"FancyZonesLogs\\"; // needed to clean up old logs

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso</OutputPath> <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake</OutputPath>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@ -11,9 +11,9 @@
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<!--Per documentation: https://docs.microsoft.com/dotnet/core/compatibility/windows-forms/5.0/automatically-infer-winexe-output-type#outputtype-set-to-winexe-for-wpf-and-winforms-apps --> <!--Per documentation: https://docs.microsoft.com/dotnet/core/compatibility/windows-forms/5.0/automatically-infer-winexe-output-type#outputtype-set-to-winexe-for-wpf-and-winforms-apps -->
<DisableWinExeOutputInference>true</DisableWinExeOutputInference> <DisableWinExeOutputInference>true</DisableWinExeOutputInference>
<AssemblyName>PowerToys.Espresso</AssemblyName> <AssemblyName>PowerToys.Awake</AssemblyName>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>
<ApplicationIcon>Images\Espresso.ico</ApplicationIcon> <ApplicationIcon>Images\Awake.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -78,6 +78,6 @@
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Images\Espresso.ico" /> <Resource Include="Images\Awake.ico" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
using Microsoft.Win32; using Microsoft.Win32;
using NLog; using NLog;
namespace Espresso.Shell.Core namespace Awake.Core
{ {
[Flags] [Flags]
public enum EXECUTION_STATE : uint public enum EXECUTION_STATE : uint

View File

@ -12,7 +12,7 @@ using Microsoft.PowerToys.Settings.UI.Library;
#pragma warning disable CS8602 // Dereference of a possibly null reference. #pragma warning disable CS8602 // Dereference of a possibly null reference.
#pragma warning disable CS8603 // Possible null reference return. #pragma warning disable CS8603 // Possible null reference return.
namespace Espresso.Shell.Core namespace Awake.Core
{ {
internal static class TrayHelper internal static class TrayHelper
{ {
@ -44,7 +44,7 @@ namespace Espresso.Shell.Core
}, TrayIcon); }, TrayIcon);
} }
internal static void SetTray(string text, EspressoSettings settings) internal static void SetTray(string text, AwakeSettings settings)
{ {
SetTray( SetTray(
text, text,
@ -69,15 +69,15 @@ namespace Espresso.Shell.Core
{ {
return () => return () =>
{ {
EspressoSettings currentSettings; AwakeSettings currentSettings;
try try
{ {
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName); currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
} }
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
currentSettings = new EspressoSettings(); currentSettings = new AwakeSettings();
} }
currentSettings.Properties.KeepDisplayOn = !currentSettings.Properties.KeepDisplayOn; currentSettings.Properties.KeepDisplayOn = !currentSettings.Properties.KeepDisplayOn;
@ -90,18 +90,18 @@ namespace Espresso.Shell.Core
{ {
return (hours, minutes) => return (hours, minutes) =>
{ {
EspressoSettings currentSettings; AwakeSettings currentSettings;
try try
{ {
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName); currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
} }
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
currentSettings = new EspressoSettings(); currentSettings = new AwakeSettings();
} }
currentSettings.Properties.Mode = EspressoMode.TIMED; currentSettings.Properties.Mode = AwakeMode.TIMED;
currentSettings.Properties.Hours = hours; currentSettings.Properties.Hours = hours;
currentSettings.Properties.Minutes = minutes; currentSettings.Properties.Minutes = minutes;
@ -113,18 +113,18 @@ namespace Espresso.Shell.Core
{ {
return () => return () =>
{ {
EspressoSettings currentSettings; AwakeSettings currentSettings;
try try
{ {
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName); currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
} }
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
currentSettings = new EspressoSettings(); currentSettings = new AwakeSettings();
} }
currentSettings.Properties.Mode = EspressoMode.PASSIVE; currentSettings.Properties.Mode = AwakeMode.PASSIVE;
ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName);
}; };
@ -134,24 +134,24 @@ namespace Espresso.Shell.Core
{ {
return () => return () =>
{ {
EspressoSettings currentSettings; AwakeSettings currentSettings;
try try
{ {
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName); currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
} }
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
currentSettings = new EspressoSettings(); currentSettings = new AwakeSettings();
} }
currentSettings.Properties.Mode = EspressoMode.INDEFINITE; currentSettings.Properties.Mode = AwakeMode.INDEFINITE;
ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName);
}; };
} }
public static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action passiveKeepAwakeCallback, Action indefiniteKeepAwakeCallback, Action<uint, uint> timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) public static void SetTray(string text, bool keepDisplayOn, AwakeMode mode, Action passiveKeepAwakeCallback, Action indefiniteKeepAwakeCallback, Action<uint, uint> timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback)
{ {
var contextMenuStrip = new ContextMenuStrip(); var contextMenuStrip = new ContextMenuStrip();
@ -167,7 +167,7 @@ namespace Espresso.Shell.Core
Text = "Off (Passive)", Text = "Off (Passive)",
}; };
if (mode == EspressoMode.PASSIVE) if (mode == AwakeMode.PASSIVE)
{ {
passiveMenuItem.Checked = true; passiveMenuItem.Checked = true;
} }
@ -188,7 +188,7 @@ namespace Espresso.Shell.Core
Text = "Keep awake indefinitely", Text = "Keep awake indefinitely",
}; };
if (mode == EspressoMode.INDEFINITE) if (mode == AwakeMode.INDEFINITE)
{ {
indefiniteMenuItem.Checked = true; indefiniteMenuItem.Checked = true;
} }
@ -227,7 +227,7 @@ namespace Espresso.Shell.Core
{ {
Text = "Keep awake temporarily", Text = "Keep awake temporarily",
}; };
if (mode == EspressoMode.TIMED) if (mode == AwakeMode.TIMED)
{ {
timedMenuItem.Checked = true; timedMenuItem.Checked = true;
} }

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -2,21 +2,23 @@
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variable name="espressoversion" value="0.0.1" /> <variable name="awakeversion" value="0.0.1" />
<targets async="true"> <targets async="true">
<target name="logfile" <target name="logfile"
xsi:type="File" xsi:type="File"
fileName="${specialfolder:folder=LocalApplicationData}/Microsoft/PowerToys/Espresso/Logs/${var:espressoversion}/log_${date:format=yyyy-MM-dd_HH}_DBG.txt" fileName="${specialfolder:folder=LocalApplicationData}/Microsoft/PowerToys/Awake/Logs/${var:awakeversion}/log_${date:format=yyyy-MM-dd_HH}_DBG.txt"
layout="[${longdate} ${level:uppercase=true} ${logger}] ${message}" layout="[${longdate} ${level:uppercase=true} ${logger}] ${message}"
archiveEvery="Day" archiveEvery="Day"
archiveNumbering="Rolling" archiveNumbering="Rolling"
maxArchiveFiles="30"/> maxArchiveFiles="30"/>
<target name="logconsole" xsi:type="Console" layout="[${longdate} ${level:uppercase=true}] ${message}" /> <target name="logconsole"
xsi:type="Console"
layout="[${longdate} ${level:uppercase=true}] ${message}" />
</targets> </targets>
<rules> <rules>
<logger name="*" minlevel="Info" writeTo="logconsole" /> <logger name="*" minlevel="Info" writeTo="logconsole" />
<logger name="*" minlevel="Debug" writeTo="logfile" /> <logger name="*" minlevel="Debug" writeTo="logfile" />
</rules> </rules>
</nlog> </nlog>

View File

@ -14,7 +14,7 @@ using System.Reactive.Linq;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Windows; using System.Windows;
using Espresso.Shell.Core; using Awake.Core;
using ManagedCommon; using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using NLog; using NLog;
@ -22,12 +22,12 @@ using NLog;
#pragma warning disable CS8602 // Dereference of a possibly null reference. #pragma warning disable CS8602 // Dereference of a possibly null reference.
#pragma warning disable CS8603 // Possible null reference return. #pragma warning disable CS8603 // Possible null reference return.
namespace Espresso.Shell namespace Awake
{ {
internal class Program internal class Program
{ {
private static Mutex? _mutex = null; private static Mutex? _mutex = null;
private const string AppName = "Espresso"; private const string AppName = "Awake";
private static FileSystemWatcher? _watcher = null; private static FileSystemWatcher? _watcher = null;
private static SettingsUtils? _settingsUtils = null; private static SettingsUtils? _settingsUtils = null;
@ -48,7 +48,7 @@ namespace Espresso.Shell
_log = LogManager.GetCurrentClassLogger(); _log = LogManager.GetCurrentClassLogger();
_settingsUtils = new SettingsUtils(); _settingsUtils = new SettingsUtils();
_log.Info("Launching Espresso..."); _log.Info("Launching PowerToys Awake...");
_log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); _log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion);
_log.Info($"OS: {Environment.OSVersion}"); _log.Info($"OS: {Environment.OSVersion}");
_log.Info($"OS Build: {APIHelper.GetOperatingSystemBuild()}"); _log.Info($"OS Build: {APIHelper.GetOperatingSystemBuild()}");
@ -58,7 +58,7 @@ namespace Espresso.Shell
var configOption = new Option<bool>( var configOption = new Option<bool>(
aliases: new[] { "--use-pt-config", "-c" }, aliases: new[] { "--use-pt-config", "-c" },
getDefaultValue: () => false, getDefaultValue: () => false,
description: "Specifies whether Espresso will be using the PowerToys configuration file for managing the state.") description: "Specifies whether PowerToys Awake will be using the PowerToys configuration file for managing the state.")
{ {
Argument = new Argument<bool>(() => false) Argument = new Argument<bool>(() => false)
{ {
@ -97,7 +97,7 @@ namespace Espresso.Shell
var pidOption = new Option<int>( var pidOption = new Option<int>(
aliases: new[] { "--pid", "-p" }, aliases: new[] { "--pid", "-p" },
getDefaultValue: () => 0, getDefaultValue: () => 0,
description: "Bind the execution of Espresso to another process.") description: "Bind the execution of PowerToys Awake to another process.")
{ {
Argument = new Argument<int>(() => 0) Argument = new Argument<int>(() => 0)
{ {
@ -151,7 +151,7 @@ namespace Espresso.Shell
try try
{ {
#pragma warning disable CS8604 // Possible null reference argument. #pragma warning disable CS8604 // Possible null reference argument.
TrayHelper.InitializeTray(AppName, new Icon(Application.GetResourceStream(new Uri("/Images/Espresso.ico", UriKind.Relative)).Stream)); TrayHelper.InitializeTray(AppName, new Icon(Application.GetResourceStream(new Uri("/Images/Awake.ico", UriKind.Relative)).Stream));
#pragma warning restore CS8604 // Possible null reference argument. #pragma warning restore CS8604 // Possible null reference argument.
var settingsPath = _settingsUtils.GetSettingsFilePath(AppName); var settingsPath = _settingsUtils.GetSettingsFilePath(AppName);
@ -178,9 +178,9 @@ namespace Espresso.Shell
mergedObservable.Throttle(TimeSpan.FromMilliseconds(25)) mergedObservable.Throttle(TimeSpan.FromMilliseconds(25))
.SubscribeOn(TaskPoolScheduler.Default) .SubscribeOn(TaskPoolScheduler.Default)
.Select(e => e.EventArgs) .Select(e => e.EventArgs)
.Subscribe(HandleEspressoConfigChange); .Subscribe(HandleAwakeConfigChange);
TrayHelper.SetTray(AppName, new EspressoSettings()); TrayHelper.SetTray(AppName, new AwakeSettings());
// Initially the file might not be updated, so we need to start processing // Initially the file might not be updated, so we need to start processing
// settings right away. // settings right away.
@ -195,9 +195,9 @@ namespace Espresso.Shell
} }
else else
{ {
var mode = timeLimit <= 0 ? EspressoMode.INDEFINITE : EspressoMode.TIMED; var mode = timeLimit <= 0 ? AwakeMode.INDEFINITE : AwakeMode.TIMED;
if (mode == EspressoMode.INDEFINITE) if (mode == AwakeMode.INDEFINITE)
{ {
SetupIndefiniteKeepAwake(displayOn); SetupIndefiniteKeepAwake(displayOn);
} }
@ -226,7 +226,7 @@ namespace Espresso.Shell
APIHelper.SetIndefiniteKeepAwake(LogCompletedKeepAwakeThread, LogUnexpectedOrCancelledKeepAwakeThreadCompletion, displayOn); APIHelper.SetIndefiniteKeepAwake(LogCompletedKeepAwakeThread, LogUnexpectedOrCancelledKeepAwakeThreadCompletion, displayOn);
} }
private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) private static void HandleAwakeConfigChange(FileSystemEventArgs fileEvent)
{ {
_log.Info("Detected a settings file change. Updating configuration..."); _log.Info("Detected a settings file change. Updating configuration...");
_log.Info("Resetting keep-awake to normal state due to settings change."); _log.Info("Resetting keep-awake to normal state due to settings change.");
@ -237,26 +237,26 @@ namespace Espresso.Shell
{ {
try try
{ {
EspressoSettings settings = _settingsUtils.GetSettings<EspressoSettings>(AppName); AwakeSettings settings = _settingsUtils.GetSettings<AwakeSettings>(AppName);
if (settings != null) if (settings != null)
{ {
switch (settings.Properties.Mode) switch (settings.Properties.Mode)
{ {
case EspressoMode.PASSIVE: case AwakeMode.PASSIVE:
{ {
SetupNoKeepAwake(); SetupNoKeepAwake();
break; break;
} }
case EspressoMode.INDEFINITE: case AwakeMode.INDEFINITE:
{ {
// Indefinite keep awake. // Indefinite keep awake.
SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn); SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn);
break; break;
} }
case EspressoMode.TIMED: case AwakeMode.TIMED:
{ {
// Timed keep-awake. // Timed keep-awake.
uint computedTime = (settings.Properties.Hours * 60 * 60) + (settings.Properties.Minutes * 60); uint computedTime = (settings.Properties.Hours * 60 * 60) + (settings.Properties.Minutes * 60);

View File

@ -0,0 +1,7 @@
#include <string>
namespace AwakeConstants
{
// Name of the powertoy module.
inline const std::wstring ModuleKey = L"Awake";
}

View File

@ -52,7 +52,7 @@ END
STRINGTABLE STRINGTABLE
BEGIN BEGIN
IDS_ESPRESSO_NAME "Espresso" IDS_AWAKE_NAME "Awake"
END END
#endif // English (United States) resources #endif // English (United States) resources

View File

@ -15,8 +15,8 @@
<VCProjectVersion>15.0</VCProjectVersion> <VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{5e7360a8-d048-4ed3-8f09-0bfd64c5529a}</ProjectGuid> <ProjectGuid>{5e7360a8-d048-4ed3-8f09-0bfd64c5529a}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>Espresso</RootNamespace> <RootNamespace>Awake</RootNamespace>
<ProjectName>EspressoModuleInterface</ProjectName> <ProjectName>AwakeModuleInterface</ProjectName>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -36,7 +36,7 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso\</OutDir> <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
@ -48,7 +48,7 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="EspressoConstants.h" /> <ClInclude Include="AwakeConstants.h" />
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />
<ClInclude Include="resource.h" /> <ClInclude Include="resource.h" />
<ClInclude Include="trace.h" /> <ClInclude Include="trace.h" />
@ -72,7 +72,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="EspressoModuleInterface.rc" /> <ResourceCompile Include="AwakeModuleInterface.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />

View File

@ -15,7 +15,7 @@
<ClInclude Include="pch.h"> <ClInclude Include="pch.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="EspressoConstants.h"> <ClInclude Include="AwakeConstants.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="trace.h"> <ClInclude Include="trace.h">
@ -43,7 +43,7 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="EspressoModuleInterface.rc"> <ResourceCompile Include="AwakeModuleInterface.rc">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</ResourceCompile> </ResourceCompile>
</ItemGroup> </ItemGroup>

View File

@ -4,7 +4,7 @@
#include <common/interop/shared_constants.h> #include <common/interop/shared_constants.h>
#include "trace.h" #include "trace.h"
#include "resource.h" #include "resource.h"
#include "EspressoConstants.h" #include "AwakeConstants.h"
#include <common/logger/logger.h> #include <common/logger/logger.h>
#include <common/SettingsAPI/settings_helpers.h> #include <common/SettingsAPI/settings_helpers.h>
@ -34,13 +34,13 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
} }
// The PowerToy name that will be shown in the settings. // The PowerToy name that will be shown in the settings.
const static wchar_t* MODULE_NAME = L"Espresso"; const static wchar_t* MODULE_NAME = L"Awake";
// Add a description that will we shown in the module settings page. // Add a description that will we shown in the module settings page.
const static wchar_t* MODULE_DESC = L"<no description>"; const static wchar_t* MODULE_DESC = L"A module that keeps your computer awake on-demand.";
// Implement the PowerToy Module Interface and all the required methods. // Implement the PowerToy Module Interface and all the required methods.
class Espresso : public PowertoyModuleIface class Awake : public PowertoyModuleIface
{ {
std::wstring app_name; std::wstring app_name;
@ -55,7 +55,7 @@ private:
HANDLE send_telemetry_event; HANDLE send_telemetry_event;
// Handle to event used to invoke Espresso // Handle to event used to invoke PowerToys Awake
HANDLE m_hInvokeEvent; HANDLE m_hInvokeEvent;
bool is_process_running() bool is_process_running()
@ -65,21 +65,21 @@ private:
void launch_process() void launch_process()
{ {
Logger::trace(L"Launching Espresso process"); Logger::trace(L"Launching PowerToys Awake process");
unsigned long powertoys_pid = GetCurrentProcessId(); unsigned long powertoys_pid = GetCurrentProcessId();
std::wstring executable_args = L"--use-pt-config --pid " + std::to_wstring(powertoys_pid); std::wstring executable_args = L"--use-pt-config --pid " + std::to_wstring(powertoys_pid);
Logger::trace(L"Espresso launching with parameters: " + executable_args); Logger::trace(L"PowerToys Awake launching with parameters: " + executable_args);
SHELLEXECUTEINFOW sei{ sizeof(sei) }; SHELLEXECUTEINFOW sei{ sizeof(sei) };
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
sei.lpFile = L"modules\\Espresso\\PowerToys.Espresso.exe"; sei.lpFile = L"modules\\Awake\\PowerToys.Awake.exe";
sei.nShow = SW_SHOWNORMAL; sei.nShow = SW_SHOWNORMAL;
sei.lpParameters = executable_args.data(); sei.lpParameters = executable_args.data();
if (!ShellExecuteExW(&sei)) if (!ShellExecuteExW(&sei))
{ {
DWORD error = GetLastError(); DWORD error = GetLastError();
std::wstring message = L"Espresso failed to start with error = "; std::wstring message = L"PowerToys Awake failed to start with error = ";
message += std::to_wstring(error); message += std::to_wstring(error);
Logger::error(message); Logger::error(message);
} }
@ -89,12 +89,12 @@ private:
public: public:
// Constructor // Constructor
Espresso() Awake()
{ {
app_name = GET_RESOURCE_STRING(IDS_ESPRESSO_NAME); app_name = GET_RESOURCE_STRING(IDS_AWAKE_NAME);
app_key = EspressoConstants::ModuleKey; app_key = AwakeConstants::ModuleKey;
std::filesystem::path logFilePath(PTSettingsHelper::get_module_save_folder_location(this->app_key)); std::filesystem::path logFilePath(PTSettingsHelper::get_module_save_folder_location(this->app_key));
logFilePath.append(LogSettings::espressoLogPath); logFilePath.append(LogSettings::awakeLogPath);
Logger::init(LogSettings::launcherLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location()); Logger::init(LogSettings::launcherLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location());
Logger::info("Launcher object is constructing"); Logger::info("Launcher object is constructing");
}; };
@ -177,5 +177,5 @@ public:
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
{ {
return new Espresso(); return new Awake();
} }

View File

@ -1,8 +1,8 @@
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by Espresso.rc // Used by Awake.rc
// //
#define IDS_ESPRESSO_NAME 101 #define IDS_AWAKE_NAME 101
// Next default values for new objects // Next default values for new objects
// //

View File

@ -1,7 +0,0 @@
#include <string>
namespace EspressoConstants
{
// Name of the powertoy module.
inline const std::wstring ModuleKey = L"Espresso";
}

View File

@ -153,7 +153,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe)
L"modules/PowerRename/PowerRenameExt.dll", L"modules/PowerRename/PowerRenameExt.dll",
L"modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.dll", L"modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.dll",
L"modules/ColorPicker/ColorPicker.dll", L"modules/ColorPicker/ColorPicker.dll",
L"modules/Espresso/EspressoModuleInterface.dll", L"modules/Awake/AwakeModuleInterface.dll",
}; };
for (const auto& moduleSubdir : knownModules) for (const auto& moduleSubdir : knownModules)

View File

@ -6,30 +6,30 @@ using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library namespace Microsoft.PowerToys.Settings.UI.Library
{ {
public class EspressoProperties public class AwakeProperties
{ {
public EspressoProperties() public AwakeProperties()
{ {
KeepDisplayOn = false; KeepDisplayOn = false;
Mode = EspressoMode.PASSIVE; Mode = AwakeMode.PASSIVE;
Hours = 0; Hours = 0;
Minutes = 0; Minutes = 0;
} }
[JsonPropertyName("espresso_keep_display_on")] [JsonPropertyName("awake_keep_display_on")]
public bool KeepDisplayOn { get; set; } public bool KeepDisplayOn { get; set; }
[JsonPropertyName("espresso_mode")] [JsonPropertyName("awake_mode")]
public EspressoMode Mode { get; set; } public AwakeMode Mode { get; set; }
[JsonPropertyName("espresso_hours")] [JsonPropertyName("awake_hours")]
public uint Hours { get; set; } public uint Hours { get; set; }
[JsonPropertyName("espresso_minutes")] [JsonPropertyName("awake_minutes")]
public uint Minutes { get; set; } public uint Minutes { get; set; }
} }
public enum EspressoMode public enum AwakeMode
{ {
PASSIVE = 0, PASSIVE = 0,
INDEFINITE = 1, INDEFINITE = 1,

View File

@ -7,20 +7,20 @@ using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Library namespace Microsoft.PowerToys.Settings.UI.Library
{ {
public class EspressoSettings : BasePTModuleSettings, ISettingsConfig public class AwakeSettings : BasePTModuleSettings, ISettingsConfig
{ {
public const string ModuleName = "Espresso"; public const string ModuleName = "Awake";
public const string ModuleVersion = "0.0.1"; public const string ModuleVersion = "0.0.1";
public EspressoSettings() public AwakeSettings()
{ {
Name = ModuleName; Name = ModuleName;
Version = ModuleVersion; Version = ModuleVersion;
Properties = new EspressoProperties(); Properties = new AwakeProperties();
} }
[JsonPropertyName("properties")] [JsonPropertyName("properties")]
public EspressoProperties Properties { get; set; } public AwakeProperties Properties { get; set; }
public string GetModuleName() public string GetModuleName()
{ {

View File

@ -143,18 +143,18 @@ namespace Microsoft.PowerToys.Settings.UI.Library
} }
} }
private bool espresso; private bool awake;
[JsonPropertyName("Espresso")] [JsonPropertyName("Awake")]
public bool Espresso public bool Awake
{ {
get => espresso; get => awake;
set set
{ {
if (espresso != value) if (awake != value)
{ {
LogTelemetryEvent(value); LogTelemetryEvent(value);
espresso = value; awake = value;
} }
} }
} }

View File

@ -2,24 +2,21 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library namespace Microsoft.PowerToys.Settings.UI.Library
{ {
public class SndEspressoSettings public class SndAwakeSettings
{ {
[JsonPropertyName("Espresso")] [JsonPropertyName("Awake")]
public EspressoSettings Settings { get; set; } public AwakeSettings Settings { get; set; }
public SndEspressoSettings() public SndAwakeSettings()
{ {
} }
public SndEspressoSettings(EspressoSettings settings) public SndAwakeSettings(AwakeSettings settings)
{ {
Settings = settings; Settings = settings;
} }

View File

@ -9,15 +9,15 @@ using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{ {
public class EspressoViewModel : Observable public class AwakeViewModel : Observable
{ {
private GeneralSettings GeneralSettingsConfig { get; set; } private GeneralSettings GeneralSettingsConfig { get; set; }
private EspressoSettings Settings { get; set; } private AwakeSettings Settings { get; set; }
private Func<string, int> SendConfigMSG { get; } private Func<string, int> SendConfigMSG { get; }
public EspressoViewModel(ISettingsRepository<GeneralSettings> settingsRepository, ISettingsRepository<EspressoSettings> moduleSettingsRepository, Func<string, int> ipcMSGCallBackFunc) public AwakeViewModel(ISettingsRepository<GeneralSettings> settingsRepository, ISettingsRepository<AwakeSettings> moduleSettingsRepository, Func<string, int> ipcMSGCallBackFunc)
{ {
// To obtain the general settings configurations of PowerToys Settings. // To obtain the general settings configurations of PowerToys Settings.
if (settingsRepository == null) if (settingsRepository == null)
@ -35,7 +35,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
Settings = moduleSettingsRepository.SettingsConfig; Settings = moduleSettingsRepository.SettingsConfig;
_isEnabled = GeneralSettingsConfig.Enabled.Espresso; _isEnabled = GeneralSettingsConfig.Enabled.Awake;
_keepDisplayOn = Settings.Properties.KeepDisplayOn; _keepDisplayOn = Settings.Properties.KeepDisplayOn;
_mode = Settings.Properties.Mode; _mode = Settings.Properties.Mode;
_hours = Settings.Properties.Hours; _hours = Settings.Properties.Hours;
@ -54,7 +54,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{ {
_isEnabled = value; _isEnabled = value;
GeneralSettingsConfig.Enabled.Espresso = value; GeneralSettingsConfig.Enabled.Awake = value;
OnPropertyChanged(nameof(IsEnabled)); OnPropertyChanged(nameof(IsEnabled));
OnPropertyChanged(nameof(IsTimeConfigurationEnabled)); OnPropertyChanged(nameof(IsTimeConfigurationEnabled));
@ -67,10 +67,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
public bool IsTimeConfigurationEnabled public bool IsTimeConfigurationEnabled
{ {
get => _mode == EspressoMode.TIMED && _isEnabled; get => _mode == AwakeMode.TIMED && _isEnabled;
} }
public EspressoMode Mode public AwakeMode Mode
{ {
get => _mode; get => _mode;
set set
@ -140,8 +140,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
OnPropertyChanged(propertyName); OnPropertyChanged(propertyName);
if (SendConfigMSG != null) if (SendConfigMSG != null)
{ {
SndEspressoSettings outsettings = new SndEspressoSettings(Settings); SndAwakeSettings outsettings = new SndAwakeSettings(Settings);
SndModuleSettings<SndEspressoSettings> ipcMessage = new SndModuleSettings<SndEspressoSettings>(outsettings); SndModuleSettings<SndAwakeSettings> ipcMessage = new SndModuleSettings<SndAwakeSettings>(outsettings);
var targetMessage = ipcMessage.ToJsonString(); var targetMessage = ipcMessage.ToJsonString();
SendConfigMSG(targetMessage); SendConfigMSG(targetMessage);
@ -152,6 +152,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private uint _hours; private uint _hours;
private uint _minutes; private uint _minutes;
private bool _keepDisplayOn; private bool _keepDisplayOn;
private EspressoMode _mode; private AwakeMode _mode;
} }
} }

View File

@ -8,7 +8,7 @@ using Windows.UI.Xaml.Data;
namespace Microsoft.PowerToys.Settings.UI.Converters namespace Microsoft.PowerToys.Settings.UI.Converters
{ {
public sealed class EspressoModeToBoolConverter : IValueConverter public sealed class AwakeModeToBoolConverter : IValueConverter
{ {
public object Convert(object value, Type targetType, object parameter, string language) public object Convert(object value, Type targetType, object parameter, string language)
{ {
@ -19,11 +19,11 @@ namespace Microsoft.PowerToys.Settings.UI.Converters
if (parameter == null) if (parameter == null)
{ {
throw new NullReferenceException("Parameter cannot be null for the Espresso mode to bool converter."); throw new NullReferenceException("Parameter cannot be null for the PowerToys Awake mode to bool converter.");
} }
var expectedMode = (EspressoMode)Enum.Parse(typeof(EspressoMode), parameter.ToString()); var expectedMode = (AwakeMode)Enum.Parse(typeof(AwakeMode), parameter.ToString());
var currentMode = (EspressoMode)value; var currentMode = (AwakeMode)value;
return currentMode.Equals(expectedMode); return currentMode.Equals(expectedMode);
} }
@ -32,10 +32,10 @@ namespace Microsoft.PowerToys.Settings.UI.Converters
{ {
if (parameter == null) if (parameter == null)
{ {
throw new NullReferenceException("Parameter cannot be null for the Espresso mode to bool converter."); throw new NullReferenceException("Parameter cannot be null for the PowerToys Awake mode to bool converter.");
} }
return (EspressoMode)Enum.Parse(typeof(EspressoMode), parameter.ToString()); return (AwakeMode)Enum.Parse(typeof(AwakeMode), parameter.ToString());
} }
} }
} }

View File

@ -105,7 +105,7 @@
<Compile Include="Controls\ShortcutVisualControl.xaml.cs"> <Compile Include="Controls\ShortcutVisualControl.xaml.cs">
<DependentUpon>ShortcutVisualControl.xaml</DependentUpon> <DependentUpon>ShortcutVisualControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Converters\EspressoModeToBoolConverter.cs" /> <Compile Include="Converters\AwakeModeToBoolConverter.cs" />
<Compile Include="Converters\ModuleEnabledToForegroundConverter.cs" /> <Compile Include="Converters\ModuleEnabledToForegroundConverter.cs" />
<Compile Include="Converters\UpdatingStateCannotDownloadToVisibilityConverter.cs" /> <Compile Include="Converters\UpdatingStateCannotDownloadToVisibilityConverter.cs" />
<Compile Include="Converters\UpdatingStateReadyToDownloadToVisibilityConverter.cs" /> <Compile Include="Converters\UpdatingStateReadyToDownloadToVisibilityConverter.cs" />
@ -126,8 +126,8 @@
<Compile Include="OOBE\Enums\PowerToysModulesEnum.cs" /> <Compile Include="OOBE\Enums\PowerToysModulesEnum.cs" />
<Compile Include="OOBE\ViewModel\OobeShellViewModel.cs" /> <Compile Include="OOBE\ViewModel\OobeShellViewModel.cs" />
<Compile Include="OOBE\ViewModel\OobePowerToysModule.cs" /> <Compile Include="OOBE\ViewModel\OobePowerToysModule.cs" />
<Compile Include="OOBE\Views\OobeEspresso.xaml.cs"> <Compile Include="OOBE\Views\OobeAwake.xaml.cs">
<DependentUpon>OobeEspresso.xaml</DependentUpon> <DependentUpon>OobeAwake.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OOBE\Views\OobeColorPicker.xaml.cs"> <Compile Include="OOBE\Views\OobeColorPicker.xaml.cs">
<DependentUpon>OobeColorPicker.xaml</DependentUpon> <DependentUpon>OobeColorPicker.xaml</DependentUpon>
@ -166,8 +166,8 @@
<Compile Include="Services\NavigationService.cs" /> <Compile Include="Services\NavigationService.cs" />
<Compile Include="ViewModels\Commands\ButtonClickCommand.cs" /> <Compile Include="ViewModels\Commands\ButtonClickCommand.cs" />
<Compile Include="ViewModels\ShellViewModel.cs" /> <Compile Include="ViewModels\ShellViewModel.cs" />
<Compile Include="Views\EspressoPage.xaml.cs"> <Compile Include="Views\AwakePage.xaml.cs">
<DependentUpon>EspressoPage.xaml</DependentUpon> <DependentUpon>AwakePage.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\ColorPickerPage.xaml.cs"> <Compile Include="Views\ColorPickerPage.xaml.cs">
<DependentUpon>ColorPickerPage.xaml</DependentUpon> <DependentUpon>ColorPickerPage.xaml</DependentUpon>
@ -208,7 +208,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Assets\FluentIcons\FluentIconsColorPicker.png" /> <Content Include="Assets\FluentIcons\FluentIconsColorPicker.png" />
<Content Include="Assets\FluentIcons\FluentIconsEspresso.png" /> <Content Include="Assets\FluentIcons\FluentIconsAwake.png" />
<Content Include="Assets\FluentIcons\FluentIconsFancyZones.png" /> <Content Include="Assets\FluentIcons\FluentIconsFancyZones.png" />
<Content Include="Assets\FluentIcons\FluentIconsFileExplorerPreview.png" /> <Content Include="Assets\FluentIcons\FluentIconsFileExplorerPreview.png" />
<Content Include="Assets\FluentIcons\FluentIconsImageResizer.png" /> <Content Include="Assets\FluentIcons\FluentIconsImageResizer.png" />
@ -220,12 +220,12 @@
<Content Include="Assets\FluentIcons\FluentIconsVideoConferenceMute.png" /> <Content Include="Assets\FluentIcons\FluentIconsVideoConferenceMute.png" />
<Content Include="Assets\Logo.scale-200.png" /> <Content Include="Assets\Logo.scale-200.png" />
<Content Include="Assets\Modules\ColorPicker.png" /> <Content Include="Assets\Modules\ColorPicker.png" />
<Content Include="Assets\Modules\Espresso.png" /> <Content Include="Assets\Modules\Awake.png" />
<Content Include="Assets\Modules\FancyZones.png" /> <Content Include="Assets\Modules\FancyZones.png" />
<Content Include="Assets\Modules\ImageResizer.png" /> <Content Include="Assets\Modules\ImageResizer.png" />
<Content Include="Assets\Modules\KBM.png" /> <Content Include="Assets\Modules\KBM.png" />
<Content Include="Assets\Modules\OOBE\ColorPicker.gif" /> <Content Include="Assets\Modules\OOBE\ColorPicker.gif" />
<Content Include="Assets\Modules\OOBE\Espresso.png" /> <Content Include="Assets\Modules\OOBE\Awake.png" />
<Content Include="Assets\Modules\OOBE\FancyZones.gif" /> <Content Include="Assets\Modules\OOBE\FancyZones.gif" />
<Content Include="Assets\Modules\OOBE\FileExplorer.png" /> <Content Include="Assets\Modules\OOBE\FileExplorer.png" />
<Content Include="Assets\Modules\OOBE\ImageResizer.gif" /> <Content Include="Assets\Modules\OOBE\ImageResizer.gif" />
@ -308,7 +308,7 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="OOBE\Views\OobeEspresso.xaml"> <Page Include="OOBE\Views\OobeAwake.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
@ -384,7 +384,7 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Views\EspressoPage.xaml"> <Page Include="Views\AwakePage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
@ -466,4 +466,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View File

@ -8,7 +8,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Enums
{ {
Overview = 0, Overview = 0,
ColorPicker, ColorPicker,
Espresso, Awake,
FancyZones, FancyZones,
FileExplorer, FileExplorer,
ImageResizer, ImageResizer,

View File

@ -1,4 +1,4 @@
<Page x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeEspresso" <Page x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeAwake"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views" xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
@ -42,13 +42,13 @@
AutomationProperties.HeadingLevel="Level3" AutomationProperties.HeadingLevel="Level3"
Style="{StaticResource OobeSubtitleStyle}" /> Style="{StaticResource OobeSubtitleStyle}" />
<controls:ShortcutTextControl x:Uid="Oobe_Espresso_HowToUse" /> <controls:ShortcutTextControl x:Uid="Oobe_Awake_HowToUse" />
<TextBlock x:Uid="Oobe_TipsAndTricks" <TextBlock x:Uid="Oobe_TipsAndTricks"
AutomationProperties.HeadingLevel="Level3" AutomationProperties.HeadingLevel="Level3"
Style="{StaticResource OobeSubtitleStyle}"/> Style="{StaticResource OobeSubtitleStyle}"/>
<controls:ShortcutTextControl x:Uid="Oobe_Espresso_TipsAndTricks" /> <controls:ShortcutTextControl x:Uid="Oobe_Awake_TipsAndTricks" />
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
Spacing="4" Spacing="4"

View File

@ -2,7 +2,6 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System.Threading;
using Microsoft.PowerToys.Settings.UI.OOBE.Enums; using Microsoft.PowerToys.Settings.UI.OOBE.Enums;
using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel;
using Microsoft.PowerToys.Settings.UI.Views; using Microsoft.PowerToys.Settings.UI.Views;
@ -14,14 +13,14 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
/// <summary> /// <summary>
/// An empty page that can be used on its own or navigated to within a Frame. /// An empty page that can be used on its own or navigated to within a Frame.
/// </summary> /// </summary>
public sealed partial class OobeEspresso : Page public sealed partial class OobeAwake : Page
{ {
public OobePowerToysModule ViewModel { get; set; } public OobePowerToysModule ViewModel { get; set; }
public OobeEspresso() public OobeAwake()
{ {
this.InitializeComponent(); InitializeComponent();
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModulesEnum.Espresso]); ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModulesEnum.Awake]);
DataContext = ViewModel; DataContext = ViewModel;
} }
@ -29,7 +28,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
{ {
if (OobeShellPage.OpenMainWindowCallback != null) if (OobeShellPage.OpenMainWindowCallback != null)
{ {
OobeShellPage.OpenMainWindowCallback(typeof(EspressoPage)); OobeShellPage.OpenMainWindowCallback(typeof(AwakePage));
} }
ViewModel.LogOpeningSettingsEvent(); ViewModel.LogOpeningSettingsEvent();

View File

@ -81,17 +81,17 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
Description = loader.GetString("Oobe_ColorPicker_Description"), Description = loader.GetString("Oobe_ColorPicker_Description"),
Link = "https://aka.ms/PowerToysOverview_ColorPicker", Link = "https://aka.ms/PowerToysOverview_ColorPicker",
}); });
Modules.Insert((int)PowerToysModulesEnum.Espresso, new OobePowerToysModule() Modules.Insert((int)PowerToysModulesEnum.Awake, new OobePowerToysModule()
{ {
ModuleName = loader.GetString("Oobe_Espresso"), ModuleName = loader.GetString("Oobe_Awake"),
Tag = "Espresso", Tag = "Awake",
IsNew = false, IsNew = false,
Icon = "\uEC32", Icon = "\uEC32",
Image = "ms-appx:///Assets/Modules/Espresso.png", Image = "ms-appx:///Assets/Modules/Awake.png",
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsEspresso.png", FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsAwake.png",
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Espresso.png", PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Awake.png",
Description = loader.GetString("Oobe_Espresso_Description"), Description = loader.GetString("Oobe_Awake_Description"),
Link = "https://aka.ms/PowerToysOverview_Espresso", Link = "https://aka.ms/PowerToysOverview_Awake",
}); });
Modules.Insert((int)PowerToysModulesEnum.FancyZones, new OobePowerToysModule() Modules.Insert((int)PowerToysModulesEnum.FancyZones, new OobePowerToysModule()
{ {
@ -216,7 +216,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
{ {
case "Overview": NavigationFrame.Navigate(typeof(OobeOverview)); break; case "Overview": NavigationFrame.Navigate(typeof(OobeOverview)); break;
case "ColorPicker": NavigationFrame.Navigate(typeof(OobeColorPicker)); break; case "ColorPicker": NavigationFrame.Navigate(typeof(OobeColorPicker)); break;
case "Espresso": NavigationFrame.Navigate(typeof(OobeEspresso)); break; case "Awake": NavigationFrame.Navigate(typeof(OobeAwake)); break;
case "FancyZones": NavigationFrame.Navigate(typeof(OobeFancyZones)); break; case "FancyZones": NavigationFrame.Navigate(typeof(OobeFancyZones)); break;
case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break; case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break;
case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break; case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break;

View File

@ -121,9 +121,9 @@
<value>General</value> <value>General</value>
<comment>Navigation view item name for General</comment> <comment>Navigation view item name for General</comment>
</data> </data>
<data name="Shell_Espresso.Content" xml:space="preserve"> <data name="Shell_Awake.Content" xml:space="preserve">
<value>Espresso</value> <value>Awake</value>
<comment>Product name: Navigation view item name for Espresso</comment> <comment>Product name: Navigation view item name for Awake</comment>
</data> </data>
<data name="Shell_PowerLauncher.Content" xml:space="preserve"> <data name="Shell_PowerLauncher.Content" xml:space="preserve">
<value>PowerToys Run</value> <value>PowerToys Run</value>
@ -912,8 +912,8 @@
<value>https://aka.ms/PowerToysOverview_ColorPicker</value> <value>https://aka.ms/PowerToysOverview_ColorPicker</value>
<comment>URL. Do not loc</comment> <comment>URL. Do not loc</comment>
</data> </data>
<data name="Espresso_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve"> <data name="Awake_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve">
<value>https://aka.ms/PowerToysOverview_Espresso</value> <value>https://aka.ms/PowerToysOverview_Awake</value>
<comment>URL. Do not loc</comment> <comment>URL. Do not loc</comment>
</data> </data>
<data name="FancyZones_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve"> <data name="FancyZones_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve">
@ -1209,67 +1209,67 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
<data name="SettingsWindow_Title" xml:space="preserve"> <data name="SettingsWindow_Title" xml:space="preserve">
<value>PowerToys Settings</value> <value>PowerToys Settings</value>
</data> </data>
<data name="About_Espresso.Text" xml:space="preserve"> <data name="About_Awake.Text" xml:space="preserve">
<value>About Espresso</value> <value>About Awake</value>
</data> </data>
<data name="Espresso_Description.Text" xml:space="preserve"> <data name="Awake_Description.Text" xml:space="preserve">
<value>A convenient way to keep your PC awake on-demand.</value> <value>A convenient way to keep your PC awake on-demand.</value>
</data> </data>
<data name="Espresso_EnableEspresso.Header" xml:space="preserve"> <data name="Awake_EnableAwake.Header" xml:space="preserve">
<value>Enable Espresso</value> <value>Enable Awake</value>
</data> </data>
<data name="Espresso_NoKeepAwakeContent.Text" xml:space="preserve"> <data name="Awake_NoKeepAwakeContent.Text" xml:space="preserve">
<value>Off (Passive)</value> <value>Off (Passive)</value>
</data> </data>
<data name="Espresso_IndefiniteKeepAwakeContent.Text" xml:space="preserve"> <data name="Awake_IndefiniteKeepAwakeContent.Text" xml:space="preserve">
<value>Keep awake indefinitely</value> <value>Keep awake indefinitely</value>
</data> </data>
<data name="Espresso_TemporaryKeepAwakeContent.Text" xml:space="preserve"> <data name="Awake_TemporaryKeepAwakeContent.Text" xml:space="preserve">
<value>Keep awake temporarily</value> <value>Keep awake temporarily</value>
</data> </data>
<data name="Espresso_NoKeepAwakeDescription.Text" xml:space="preserve"> <data name="Awake_NoKeepAwakeDescription.Text" xml:space="preserve">
<value>Your PC operates according to its current power plan</value> <value>Your PC operates according to its current power plan</value>
</data> </data>
<data name="Espresso_IndefiniteKeepAwakeDescription.Text" xml:space="preserve"> <data name="Awake_IndefiniteKeepAwakeDescription.Text" xml:space="preserve">
<value>Keeps your PC awake until the setting is disabled</value> <value>Keeps your PC awake until the setting is disabled</value>
</data> </data>
<data name="Espresso_TemporaryKeepAwakeDescription.Text" xml:space="preserve"> <data name="Awake_TemporaryKeepAwakeDescription.Text" xml:space="preserve">
<value>Keeps your PC awake until the set time elapses</value> <value>Keeps your PC awake until the set time elapses</value>
</data> </data>
<data name="Espresso_EnableDisplayKeepAwake.Content" xml:space="preserve"> <data name="Awake_EnableDisplayKeepAwake.Content" xml:space="preserve">
<value>Keep screen on</value> <value>Keep screen on</value>
</data> </data>
<data name="Espresso_Mode.Text" xml:space="preserve"> <data name="Awake_Mode.Text" xml:space="preserve">
<value>Mode</value> <value>Mode</value>
</data> </data>
<data name="Espresso_Behavior_GroupSettings.Text" xml:space="preserve"> <data name="Awake_Behavior_GroupSettings.Text" xml:space="preserve">
<value>Behavior</value> <value>Behavior</value>
</data> </data>
<data name="Espresso_TemporaryKeepAwake_Hours.Header" xml:space="preserve"> <data name="Awake_TemporaryKeepAwake_Hours.Header" xml:space="preserve">
<value>Hours</value> <value>Hours</value>
</data> </data>
<data name="Espresso_TemporaryKeepAwake_Minutes.Header" xml:space="preserve"> <data name="Awake_TemporaryKeepAwake_Minutes.Header" xml:space="preserve">
<value>Minutes</value> <value>Minutes</value>
</data> </data>
<data name="Espresso_ModuleAttributionLabel.Text" xml:space="preserve"> <data name="Awake_ModuleAttributionLabel.Text" xml:space="preserve">
<value>Den Delimarsky's Espresso</value> <value>Den Delimarsky's Awake</value>
</data> </data>
<data name="Espresso_ModuleAttributionHyperlink.NavigateUri" xml:space="preserve"> <data name="Awake_ModuleAttributionHyperlink.NavigateUri" xml:space="preserve">
<value>https://espresso.den.dev</value> <value>https://Awake.den.dev</value>
<comment>URL. Do not loc</comment> <comment>URL. Do not loc</comment>
</data> </data>
<data name="Oobe_Espresso" xml:space="preserve"> <data name="Oobe_Awake" xml:space="preserve">
<value>Espresso</value> <value>Awake</value>
<comment>Module name, do not loc</comment> <comment>Module name, do not loc</comment>
</data> </data>
<data name="Oobe_Espresso_Description" xml:space="preserve"> <data name="Oobe_Awake_Description" xml:space="preserve">
<value>Espresso is a Windows tool designed to keep your PC awake on-demand without having to manage its power settings. This behavior can be helpful when running time-consuming tasks while ensuring that your PC does not go to sleep or turn off its screens.</value> <value>Awake is a Windows tool designed to keep your PC awake on-demand without having to manage its power settings. This behavior can be helpful when running time-consuming tasks while ensuring that your PC does not go to sleep or turn off its screens.</value>
</data> </data>
<data name="Oobe_Espresso_HowToUse.Text" xml:space="preserve"> <data name="Oobe_Awake_HowToUse.Text" xml:space="preserve">
<value>Open {PowerToys Settings} and enable Espresso</value> <value>Open {PowerToys Settings} and enable Awake</value>
</data> </data>
<data name="Oobe_Espresso_TipsAndTricks.Text" xml:space="preserve"> <data name="Oobe_Awake_TipsAndTricks.Text" xml:space="preserve">
<value>You can always change modes quickly by {right-clicking the Espresso icon} in the system tray.</value> <value>You can always change modes quickly by {right-clicking the Awake icon} in the system tray.</value>
</data> </data>
<data name="General_FailedToDownloadTheNewVersion.Text" xml:space="preserve"> <data name="General_FailedToDownloadTheNewVersion.Text" xml:space="preserve">
<value>An error occurred trying to update to</value> <value>An error occurred trying to update to</value>

View File

@ -1,5 +1,5 @@
<Page <Page
x:Class="Microsoft.PowerToys.Settings.UI.Views.EspressoPage" x:Class="Microsoft.PowerToys.Settings.UI.Views.AwakePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -13,7 +13,7 @@
AutomationProperties.LandmarkType="Main"> AutomationProperties.LandmarkType="Main">
<Page.Resources> <Page.Resources>
<c:EspressoModeToBoolConverter x:Key="EspressoModeToBoolConverter" /> <c:AwakeModeToBoolConverter x:Key="AwakeModeToBoolConverter" />
</Page.Resources> </Page.Resources>
<Grid RowSpacing="{StaticResource DefaultRowSpacing}"> <Grid RowSpacing="{StaticResource DefaultRowSpacing}">
@ -50,68 +50,70 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical"
x:Name="EspressoView" x:Name="AwakeView"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="0,0,48,0" Margin="0,0,48,0"
MaxWidth="{StaticResource MaxContentWidth}"> MaxWidth="{StaticResource MaxContentWidth}">
<ToggleSwitch x:Uid="Espresso_EnableEspresso" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" /> <ToggleSwitch x:Uid="Awake_EnableAwake" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
<TextBlock x:Uid="Espresso_Behavior_GroupSettings" <TextBlock x:Uid="Awake_Behavior_GroupSettings"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}" Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
Style="{StaticResource SettingsGroupTitleStyle}"/> Style="{StaticResource SettingsGroupTitleStyle}"/>
<CheckBox x:Uid="Espresso_EnableDisplayKeepAwake" <CheckBox x:Uid="Awake_EnableDisplayKeepAwake"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsChecked="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" IsChecked="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}"
Margin="{StaticResource XSmallTopMargin}" /> Margin="{StaticResource XSmallTopMargin}" />
<TextBlock x:Uid="Espresso_Mode" <TextBlock x:Uid="Awake_Mode"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
x:Name="ModeTitleLabel" x:Name="ModeTitleLabel"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}" /> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}" />
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"> <StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"
<RadioButton x:Uid="Espresso_NoKeepAwake" Margin="0,-8,0,0">
<RadioButton x:Uid="Awake_NoKeepAwake"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource EspressoModeToBoolConverter}, ConverterParameter=0}"> IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=0}">
<RadioButton.Content> <RadioButton.Content>
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20"> <TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
<Run x:Uid="Espresso_NoKeepAwakeContent"/> <Run x:Uid="Awake_NoKeepAwakeContent"/>
<LineBreak/> <LineBreak/>
<Run Foreground="{ThemeResource SystemBaseMediumColor}" <Run Foreground="{ThemeResource SystemBaseMediumColor}"
x:Uid="Espresso_NoKeepAwakeDescription"/> x:Uid="Awake_NoKeepAwakeDescription"/>
</TextBlock> </TextBlock>
</RadioButton.Content> </RadioButton.Content>
</RadioButton> </RadioButton>
<RadioButton x:Uid="Espresso_IndefiniteKeepAwake" <RadioButton x:Uid="Awake_IndefiniteKeepAwake"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource EspressoModeToBoolConverter}, ConverterParameter=1}"> IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=1}">
<RadioButton.Content> <RadioButton.Content>
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20"> <TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
<Run x:Uid="Espresso_IndefiniteKeepAwakeContent"/> <Run x:Uid="Awake_IndefiniteKeepAwakeContent"/>
<LineBreak/> <LineBreak/>
<Run Foreground="{ThemeResource SystemBaseMediumColor}" <Run Foreground="{ThemeResource SystemBaseMediumColor}"
x:Uid="Espresso_IndefiniteKeepAwakeDescription"/> x:Uid="Awake_IndefiniteKeepAwakeDescription"/>
</TextBlock> </TextBlock>
</RadioButton.Content> </RadioButton.Content>
</RadioButton> </RadioButton>
<RadioButton x:Uid="Espresso_TemporaryKeepAwake" <RadioButton x:Uid="Awake_TemporaryKeepAwake"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource EspressoModeToBoolConverter}, ConverterParameter=2}"> IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=2}">
<RadioButton.Content> <RadioButton.Content>
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20"> <TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
<Run x:Uid="Espresso_TemporaryKeepAwakeContent"/> <Run x:Uid="Awake_TemporaryKeepAwakeContent"/>
<LineBreak/> <LineBreak/>
<Run Foreground="{ThemeResource SystemBaseMediumColor}" <Run Foreground="{ThemeResource SystemBaseMediumColor}"
x:Uid="Espresso_TemporaryKeepAwakeDescription"/> x:Uid="Awake_TemporaryKeepAwakeDescription"/>
</TextBlock> </TextBlock>
</RadioButton.Content> </RadioButton.Content>
</RadioButton> </RadioButton>
<StackPanel Margin="28,8,0,0" Orientation="Horizontal"> <StackPanel Margin="28,8,0,0" Orientation="Horizontal">
<muxc:NumberBox x:Uid="Espresso_TemporaryKeepAwake_Hours" <muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Hours"
Value="{x:Bind ViewModel.Hours, Mode=TwoWay}" Value="{x:Bind ViewModel.Hours, Mode=TwoWay}"
Minimum="0" Minimum="0"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
@ -120,7 +122,7 @@
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}" IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
SmallChange="1" SmallChange="1"
LargeChange="5"/> LargeChange="5"/>
<muxc:NumberBox x:Uid="Espresso_TemporaryKeepAwake_Minutes" <muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}" Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
Minimum="0" Minimum="0"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
@ -139,12 +141,12 @@
Width="{StaticResource SidePanelWidth}" Width="{StaticResource SidePanelWidth}"
Grid.Column="1"> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel"> <StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_Espresso" <TextBlock x:Uid="About_Awake"
x:Name="AboutTitle" x:Name="AboutTitle"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/> Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="Espresso_Description" <TextBlock x:Uid="Awake_Description"
TextWrapping="Wrap" TextWrapping="Wrap"
Grid.Row="1" /> Grid.Row="1" />
</StackPanel> </StackPanel>
@ -156,15 +158,15 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}" Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel"> RelativePanel.Below="DescriptionPanel">
<HyperlinkButton x:Uid="Espresso_ImageHyperlinkToDocs"> <HyperlinkButton x:Uid="Awake_ImageHyperlinkToDocs">
<Image x:Uid="Espresso_Image" Source="ms-appx:///Assets/Modules/Espresso.png" /> <Image x:Uid="Awake_Image" Source="ms-appx:///Assets/Modules/Awake.png" />
</HyperlinkButton> </HyperlinkButton>
</Border> </Border>
<StackPanel x:Name="LinksPanel" <StackPanel x:Name="LinksPanel"
Margin="0,1,0,0" Margin="0,1,0,0"
RelativePanel.Below="AboutImage" RelativePanel.Below="AboutImage"
Orientation="Vertical" > Orientation="Vertical" >
<HyperlinkButton x:Uid="Espresso_ImageHyperlinkToDocs"> <HyperlinkButton x:Uid="Awake_ImageHyperlinkToDocs">
<TextBlock x:Uid="Module_overview" /> <TextBlock x:Uid="Module_overview" />
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri="https://aka.ms/powerToysGiveFeedback"> <HyperlinkButton NavigateUri="https://aka.ms/powerToysGiveFeedback">
@ -176,11 +178,11 @@
Style="{StaticResource SettingsGroupTitleStyle}" /> Style="{StaticResource SettingsGroupTitleStyle}" />
<HyperlinkButton Margin="0,-3,0,0" <HyperlinkButton Margin="0,-3,0,0"
x:Uid="Espresso_ModuleAttributionHyperlink"> x:Uid="Awake_ModuleAttributionHyperlink">
<TextBlock x:Uid="Espresso_ModuleAttributionLabel" <TextBlock x:Uid="Awake_ModuleAttributionLabel"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</RelativePanel> </RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@ -8,14 +8,14 @@ using Windows.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Views namespace Microsoft.PowerToys.Settings.UI.Views
{ {
public sealed partial class EspressoPage : Page public sealed partial class AwakePage : Page
{ {
private EspressoViewModel ViewModel { get; set; } private AwakeViewModel ViewModel { get; set; }
public EspressoPage() public AwakePage()
{ {
var settingsUtils = new SettingsUtils(); var settingsUtils = new SettingsUtils();
ViewModel = new EspressoViewModel(SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), SettingsRepository<EspressoSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage); ViewModel = new AwakeViewModel(SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), SettingsRepository<AwakeSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel; DataContext = ViewModel;
InitializeComponent(); InitializeComponent();
} }

View File

@ -42,7 +42,7 @@
</winui:NavigationViewItem.Icon> </winui:NavigationViewItem.Icon>
</winui:NavigationViewItem> </winui:NavigationViewItem>
<winui:NavigationViewItem x:Uid="Shell_Espresso" helpers:NavHelper.NavigateTo="views:EspressoPage" AutomationProperties.HeadingLevel="Level1"> <winui:NavigationViewItem x:Uid="Shell_Awake" helpers:NavHelper.NavigateTo="views:AwakePage" AutomationProperties.HeadingLevel="Level1">
<winui:NavigationViewItem.Icon> <winui:NavigationViewItem.Icon>
<FontIcon Glyph="&#xEC32;"/> <FontIcon Glyph="&#xEC32;"/>
</winui:NavigationViewItem.Icon> </winui:NavigationViewItem.Icon>

View File

@ -16,7 +16,7 @@ namespace
{ {
L"PowerToys.exe", L"PowerToys.exe",
L"ColorPickerUI.exe", L"ColorPickerUI.exe",
L"PowerToys.Espresso.exe" L"PowerToys.Awake.exe"
L"FancyZonesEditor.exe", L"FancyZonesEditor.exe",
L"PowerToys.KeyboardManagerEngine.exe", L"PowerToys.KeyboardManagerEngine.exe",
L"PowerToys.KeyboardManagerEditor.exe", L"PowerToys.KeyboardManagerEditor.exe",