🧼 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
2
.github/actions/spell-check/expect.txt
vendored
|
@ -142,6 +142,7 @@ autoplay
|
|||
Autorun
|
||||
AUTOSIZECOLUMNS
|
||||
autoupdate
|
||||
awakeversion
|
||||
AValid
|
||||
AWAYMODE
|
||||
azurecr
|
||||
|
@ -628,7 +629,6 @@ errorlevel
|
|||
ERRORMESSAGE
|
||||
ERRORTITLE
|
||||
esize
|
||||
espressoversion
|
||||
estdir
|
||||
etcore
|
||||
etl
|
||||
|
|
|
@ -81,13 +81,14 @@ build:
|
|||
- 'modules\ColorPicker\Microsoft.PowerToys.Settings.UI.Lib.dll'
|
||||
- 'modules\ColorPicker\PowerToysInterop.dll'
|
||||
- 'modules\ColorPicker\Telemetry.dll'
|
||||
- 'modules\Espresso\EspressoModuleInterface.dll'
|
||||
- 'modules\Espresso\ManagedCommon.dll'
|
||||
- 'modules\Espresso\ManagedTelemetry.dll'
|
||||
- 'modules\Espresso\Microsoft.PowerToys.Settings.UI.Lib.dll'
|
||||
- 'modules\Espresso\PowerToys.Espresso.exe'
|
||||
- 'modules\Espresso\PowerToys.Espresso.dll'
|
||||
- 'modules\Espresso\PowerToysInterop.dll'
|
||||
- '**\*.resources.dll'
|
||||
- 'modules\Awake\AwakeModuleInterface.dll'
|
||||
- 'modules\Awake\ManagedCommon.dll'
|
||||
- 'modules\Awake\ManagedTelemetry.dll'
|
||||
- 'modules\Awake\Microsoft.PowerToys.Settings.UI.Lib.dll'
|
||||
- 'modules\Awake\PowerToys.Awake.exe'
|
||||
- 'modules\Awake\PowerToys.Awake.dll'
|
||||
- 'modules\Awake\PowerToysInterop.dll'
|
||||
- 'modules\FancyZones\fancyzones.dll'
|
||||
- 'modules\FancyZones\FancyZonesEditor.exe'
|
||||
- 'modules\FancyZones\FancyZonesEditor.dll'
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerExt", "src\modu
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageResizerUITest", "src\modules\imageresizer\tests\ImageResizerUITest.csproj", "{E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}"
|
||||
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
|
||||
{17DA04DF-E393-4397-9CF0-84DABE11032E} = {17DA04DF-E393-4397-9CF0-84DABE11032E}
|
||||
EndProjectSection
|
||||
|
@ -328,15 +328,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorLibrar
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", "src\modules\keyboardmanager\KeyboardManagerEditorTest\KeyboardManagerEditorTest.vcxproj", "{62173D9A-6724-4C00-A1C8-FB646480A9EC}"
|
||||
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
|
||||
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}"
|
||||
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}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso\Espresso.csproj", "{D940E07F-532C-4FF3-883F-790DA014F19A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shortcutguide", "shortcutguide", "{106CBECA-0701-4FC3-838C-9DF816A19AE2}"
|
||||
EndProject
|
||||
|
|
|
@ -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) |
|
||||
| [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) |
|
||||
| Espresso (Coming soon in 0.39) | | |
|
||||
| Awake (Coming soon in 0.39) | | |
|
||||
## Installing and running Microsoft PowerToys
|
||||
|
||||
### Requirements
|
||||
|
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
|
@ -8,7 +8,7 @@
|
|||
<?define KeyboardManagerProjectName="KeyboardManager"?>
|
||||
<?define PowerRenameProjectName="PowerRename"?>
|
||||
<?define ColorPickerProjectName="ColorPicker"?>
|
||||
<?define EspressoProjectName="Espresso"?>
|
||||
<?define AwakeProjectName="Awake"?>
|
||||
|
||||
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
|
||||
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
|
||||
|
@ -220,13 +220,13 @@
|
|||
</Directory>
|
||||
<Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview" />
|
||||
<Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" />
|
||||
<Directory Id="EspressoInstallFolder" Name="$(var.EspressoProjectName)">
|
||||
<Directory Id="EspressoInstallFolderRuntimes" Name="Runtimes">
|
||||
<Directory Id="EspressoInstallFolderRuntimesWin" Name="Win">
|
||||
<Directory Id="EspressoInstallFolderRuntimesWinLib" Name="Lib">
|
||||
<Directory Id="EspressoInstallFolderNetcoreApp21" Name="netcoreapp2.1" />
|
||||
<Directory Id="EspressoInstallFolderNetcoreApp30" Name="netcoreapp3.0" />
|
||||
<Directory Id="EspressoInstallFolderNetStandard20" Name="netstandard2.0" />
|
||||
<Directory Id="AwakeInstallFolder" Name="$(var.AwakeProjectName)">
|
||||
<Directory Id="AwakeInstallFolderRuntimes" Name="Runtimes">
|
||||
<Directory Id="AwakeInstallFolderRuntimesWin" Name="Win">
|
||||
<Directory Id="AwakeInstallFolderRuntimesWinLib" Name="Lib">
|
||||
<Directory Id="AwakeInstallFolderNetcoreApp21" Name="netcoreapp2.1" />
|
||||
<Directory Id="AwakeInstallFolderNetcoreApp30" Name="netcoreapp3.0" />
|
||||
<Directory Id="AwakeInstallFolderNetStandard20" Name="netstandard2.0" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
@ -678,35 +678,35 @@
|
|||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Espresso -->
|
||||
<DirectoryRef Id="EspressoInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)">
|
||||
<Component Id="Module_Espresso" 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?>
|
||||
<File Id="EspressoFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\$(var.File)" />
|
||||
<!-- Awake -->
|
||||
<DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)">
|
||||
<Component Id="Module_Awake" Guid="F26F5780-5B38-43B2-BC21-8406ED6E2071" Win64="yes">
|
||||
<?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="AwakeFile_$(var.File)" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\$(var.File)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="EspressoInstallFolderNetStandard20" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0">
|
||||
<Component Id="Module_Espresso_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="EspressoFile_runtime_System.Runtime.Caching.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\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="EspressoFile_runtime_System.Security.Cryptography.ProtectedData.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" />
|
||||
<DirectoryRef Id="AwakeInstallFolderNetStandard20" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0">
|
||||
<Component Id="Module_Awake_runtime_netstandard20" Guid="414A31AB-91A8-4F17-9B4B-DB7B93A2BB23">
|
||||
<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="AwakeFile_runtime_System.Runtime.Caching.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.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="AwakeFile_runtime_System.Security.Cryptography.ProtectedData.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="EspressoInstallFolderNetcoreApp30" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp3.0">
|
||||
<Component Id="Module_Espresso_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="EspressoFile_runtime_System.Drawing.Common.dll" Source="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\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" />
|
||||
<DirectoryRef Id="AwakeInstallFolderNetcoreApp30" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0">
|
||||
<Component Id="Module_Awake_runtime_netcoreapp30" Guid="1EBB21FE-083A-4AE6-9208-7DC72A421860">
|
||||
<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="AwakeFile_runtime_System.Drawing.Common.dll" Source="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.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>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="EspressoInstallFolderNetcoreApp21" FileSource="$(var.BinX64Dir)modules\$(var.EspressoProjectName)\runtimes\win\lib\netcoreapp2.1">
|
||||
<Component Id="Module_Espresso_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" />
|
||||
<DirectoryRef Id="AwakeInstallFolderNetcoreApp21" FileSource="$(var.BinX64Dir)modules\$(var.AwakeProjectName)\runtimes\win\lib\netcoreapp2.1">
|
||||
<Component Id="Module_Awake_runtime_netcoreapp21" Guid="52ED2831-6F3F-47D3-AA1A-88C697BE9D0F">
|
||||
<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>
|
||||
</DirectoryRef>
|
||||
|
||||
|
@ -787,21 +787,21 @@
|
|||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2AssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules">
|
||||
<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)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2OOBEAssetsModulesInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\Modules\OOBE">
|
||||
<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)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SettingsV2OOBEAssetsFluentIconsInstallFolder" FileSource="$(var.BinX64Dir)Settings\Assets\FluentIcons">
|
||||
<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)" />
|
||||
<?endforeach?>
|
||||
</Component>
|
||||
|
@ -889,10 +889,10 @@
|
|||
<ComponentRef Id="Module_KeyboardManager_Engine" />
|
||||
<ComponentRef Id="Module_ColorPicker" />
|
||||
<ComponentRef Id="Module_ColorPicker_Resources"/>
|
||||
<ComponentRef Id="Module_Espresso"/>
|
||||
<ComponentRef Id="Module_Espresso_runtime_netstandard20"/>
|
||||
<ComponentRef Id="Module_Espresso_runtime_netcoreapp30"/>
|
||||
<ComponentRef Id="Module_Espresso_runtime_netcoreapp21"/>
|
||||
<ComponentRef Id="Module_Awake"/>
|
||||
<ComponentRef Id="Module_Awake_runtime_netstandard20"/>
|
||||
<ComponentRef Id="Module_Awake_runtime_netcoreapp30"/>
|
||||
<ComponentRef Id="Module_Awake_runtime_netcoreapp21"/>
|
||||
<ComponentRef Id="SettingsV2" />
|
||||
<ComponentRef Id="SettingsV2Assets" />
|
||||
<ComponentRef Id="SettingsV2AssetsModules" />
|
||||
|
|
|
@ -13,7 +13,7 @@ struct LogSettings
|
|||
inline const static std::wstring actionRunnerLogPath = L"RunnerLogs\\action-runner-log.txt";
|
||||
inline const static std::string launcherLoggerName = "launcher";
|
||||
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::wstring fancyZonesLogPath = L"fancyzones-log.txt";
|
||||
inline const static std::wstring fancyZonesOldLogPath = L"FancyZonesLogs\\"; // needed to clean up old logs
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso</OutputPath>
|
||||
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake</OutputPath>
|
||||
<Nullable>enable</Nullable>
|
||||
<Platforms>x64</Platforms>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
@ -11,9 +11,9 @@
|
|||
<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 -->
|
||||
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
|
||||
<AssemblyName>PowerToys.Espresso</AssemblyName>
|
||||
<AssemblyName>PowerToys.Awake</AssemblyName>
|
||||
<Version>$(Version).0</Version>
|
||||
<ApplicationIcon>Images\Espresso.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Images\Awake.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -78,6 +78,6 @@
|
|||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Espresso.ico" />
|
||||
<Resource Include="Images\Awake.ico" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.Win32;
|
||||
using NLog;
|
||||
|
||||
namespace Espresso.Shell.Core
|
||||
namespace Awake.Core
|
||||
{
|
||||
[Flags]
|
||||
public enum EXECUTION_STATE : uint
|
|
@ -12,7 +12,7 @@ using Microsoft.PowerToys.Settings.UI.Library;
|
|||
#pragma warning disable CS8602 // Dereference of a possibly null reference.
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
|
||||
namespace Espresso.Shell.Core
|
||||
namespace Awake.Core
|
||||
{
|
||||
internal static class TrayHelper
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ namespace Espresso.Shell.Core
|
|||
}, TrayIcon);
|
||||
}
|
||||
|
||||
internal static void SetTray(string text, EspressoSettings settings)
|
||||
internal static void SetTray(string text, AwakeSettings settings)
|
||||
{
|
||||
SetTray(
|
||||
text,
|
||||
|
@ -69,15 +69,15 @@ namespace Espresso.Shell.Core
|
|||
{
|
||||
return () =>
|
||||
{
|
||||
EspressoSettings currentSettings;
|
||||
AwakeSettings currentSettings;
|
||||
|
||||
try
|
||||
{
|
||||
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName);
|
||||
currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
currentSettings = new EspressoSettings();
|
||||
currentSettings = new AwakeSettings();
|
||||
}
|
||||
|
||||
currentSettings.Properties.KeepDisplayOn = !currentSettings.Properties.KeepDisplayOn;
|
||||
|
@ -90,18 +90,18 @@ namespace Espresso.Shell.Core
|
|||
{
|
||||
return (hours, minutes) =>
|
||||
{
|
||||
EspressoSettings currentSettings;
|
||||
AwakeSettings currentSettings;
|
||||
|
||||
try
|
||||
{
|
||||
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName);
|
||||
currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
currentSettings = new EspressoSettings();
|
||||
currentSettings = new AwakeSettings();
|
||||
}
|
||||
|
||||
currentSettings.Properties.Mode = EspressoMode.TIMED;
|
||||
currentSettings.Properties.Mode = AwakeMode.TIMED;
|
||||
currentSettings.Properties.Hours = hours;
|
||||
currentSettings.Properties.Minutes = minutes;
|
||||
|
||||
|
@ -113,18 +113,18 @@ namespace Espresso.Shell.Core
|
|||
{
|
||||
return () =>
|
||||
{
|
||||
EspressoSettings currentSettings;
|
||||
AwakeSettings currentSettings;
|
||||
|
||||
try
|
||||
{
|
||||
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName);
|
||||
currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
currentSettings = new EspressoSettings();
|
||||
currentSettings = new AwakeSettings();
|
||||
}
|
||||
|
||||
currentSettings.Properties.Mode = EspressoMode.PASSIVE;
|
||||
currentSettings.Properties.Mode = AwakeMode.PASSIVE;
|
||||
|
||||
ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName);
|
||||
};
|
||||
|
@ -134,24 +134,24 @@ namespace Espresso.Shell.Core
|
|||
{
|
||||
return () =>
|
||||
{
|
||||
EspressoSettings currentSettings;
|
||||
AwakeSettings currentSettings;
|
||||
|
||||
try
|
||||
{
|
||||
currentSettings = ModuleSettings.GetSettings<EspressoSettings>(moduleName);
|
||||
currentSettings = ModuleSettings.GetSettings<AwakeSettings>(moduleName);
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
currentSettings = new EspressoSettings();
|
||||
currentSettings = new AwakeSettings();
|
||||
}
|
||||
|
||||
currentSettings.Properties.Mode = EspressoMode.INDEFINITE;
|
||||
currentSettings.Properties.Mode = AwakeMode.INDEFINITE;
|
||||
|
||||
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();
|
||||
|
||||
|
@ -167,7 +167,7 @@ namespace Espresso.Shell.Core
|
|||
Text = "Off (Passive)",
|
||||
};
|
||||
|
||||
if (mode == EspressoMode.PASSIVE)
|
||||
if (mode == AwakeMode.PASSIVE)
|
||||
{
|
||||
passiveMenuItem.Checked = true;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ namespace Espresso.Shell.Core
|
|||
Text = "Keep awake indefinitely",
|
||||
};
|
||||
|
||||
if (mode == EspressoMode.INDEFINITE)
|
||||
if (mode == AwakeMode.INDEFINITE)
|
||||
{
|
||||
indefiniteMenuItem.Checked = true;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ namespace Espresso.Shell.Core
|
|||
{
|
||||
Text = "Keep awake temporarily",
|
||||
};
|
||||
if (mode == EspressoMode.TIMED)
|
||||
if (mode == AwakeMode.TIMED)
|
||||
{
|
||||
timedMenuItem.Checked = true;
|
||||
}
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
@ -2,21 +2,23 @@
|
|||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
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">
|
||||
<target name="logfile"
|
||||
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}"
|
||||
archiveEvery="Day"
|
||||
archiveNumbering="Rolling"
|
||||
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>
|
||||
|
||||
<rules>
|
||||
<logger name="*" minlevel="Info" writeTo="logconsole" />
|
||||
<logger name="*" minlevel="Debug" writeTo="logfile" />
|
||||
</rules>
|
||||
</nlog>
|
||||
</nlog>
|
|
@ -14,7 +14,7 @@ using System.Reactive.Linq;
|
|||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Espresso.Shell.Core;
|
||||
using Awake.Core;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using NLog;
|
||||
|
@ -22,12 +22,12 @@ using NLog;
|
|||
#pragma warning disable CS8602 // Dereference of a possibly null reference.
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
|
||||
namespace Espresso.Shell
|
||||
namespace Awake
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static Mutex? _mutex = null;
|
||||
private const string AppName = "Espresso";
|
||||
private const string AppName = "Awake";
|
||||
private static FileSystemWatcher? _watcher = null;
|
||||
private static SettingsUtils? _settingsUtils = null;
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace Espresso.Shell
|
|||
_log = LogManager.GetCurrentClassLogger();
|
||||
_settingsUtils = new SettingsUtils();
|
||||
|
||||
_log.Info("Launching Espresso...");
|
||||
_log.Info("Launching PowerToys Awake...");
|
||||
_log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion);
|
||||
_log.Info($"OS: {Environment.OSVersion}");
|
||||
_log.Info($"OS Build: {APIHelper.GetOperatingSystemBuild()}");
|
||||
|
@ -58,7 +58,7 @@ namespace Espresso.Shell
|
|||
var configOption = new Option<bool>(
|
||||
aliases: new[] { "--use-pt-config", "-c" },
|
||||
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)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace Espresso.Shell
|
|||
var pidOption = new Option<int>(
|
||||
aliases: new[] { "--pid", "-p" },
|
||||
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)
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ namespace Espresso.Shell
|
|||
try
|
||||
{
|
||||
#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.
|
||||
|
||||
var settingsPath = _settingsUtils.GetSettingsFilePath(AppName);
|
||||
|
@ -178,9 +178,9 @@ namespace Espresso.Shell
|
|||
mergedObservable.Throttle(TimeSpan.FromMilliseconds(25))
|
||||
.SubscribeOn(TaskPoolScheduler.Default)
|
||||
.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
|
||||
// settings right away.
|
||||
|
@ -195,9 +195,9 @@ namespace Espresso.Shell
|
|||
}
|
||||
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);
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ namespace Espresso.Shell
|
|||
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("Resetting keep-awake to normal state due to settings change.");
|
||||
|
@ -237,26 +237,26 @@ namespace Espresso.Shell
|
|||
{
|
||||
try
|
||||
{
|
||||
EspressoSettings settings = _settingsUtils.GetSettings<EspressoSettings>(AppName);
|
||||
AwakeSettings settings = _settingsUtils.GetSettings<AwakeSettings>(AppName);
|
||||
|
||||
if (settings != null)
|
||||
{
|
||||
switch (settings.Properties.Mode)
|
||||
{
|
||||
case EspressoMode.PASSIVE:
|
||||
case AwakeMode.PASSIVE:
|
||||
{
|
||||
SetupNoKeepAwake();
|
||||
break;
|
||||
}
|
||||
|
||||
case EspressoMode.INDEFINITE:
|
||||
case AwakeMode.INDEFINITE:
|
||||
{
|
||||
// Indefinite keep awake.
|
||||
SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn);
|
||||
break;
|
||||
}
|
||||
|
||||
case EspressoMode.TIMED:
|
||||
case AwakeMode.TIMED:
|
||||
{
|
||||
// Timed keep-awake.
|
||||
uint computedTime = (settings.Properties.Hours * 60 * 60) + (settings.Properties.Minutes * 60);
|
7
src/modules/awake/AwakeModuleInterface/AwakeConstants.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <string>
|
||||
|
||||
namespace AwakeConstants
|
||||
{
|
||||
// Name of the powertoy module.
|
||||
inline const std::wstring ModuleKey = L"Awake";
|
||||
}
|
|
@ -52,7 +52,7 @@ END
|
|||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ESPRESSO_NAME "Espresso"
|
||||
IDS_AWAKE_NAME "Awake"
|
||||
END
|
||||
|
||||
#endif // English (United States) resources
|
|
@ -15,8 +15,8 @@
|
|||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{5e7360a8-d048-4ed3-8f09-0bfd64c5529a}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Espresso</RootNamespace>
|
||||
<ProjectName>EspressoModuleInterface</ProjectName>
|
||||
<RootNamespace>Awake</RootNamespace>
|
||||
<ProjectName>AwakeModuleInterface</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
@ -36,7 +36,7 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso\</OutDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="EspressoConstants.h" />
|
||||
<ClInclude Include="AwakeConstants.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="trace.h" />
|
||||
|
@ -72,7 +72,7 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="EspressoModuleInterface.rc" />
|
||||
<ResourceCompile Include="AwakeModuleInterface.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
|
@ -15,7 +15,7 @@
|
|||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EspressoConstants.h">
|
||||
<ClInclude Include="AwakeConstants.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="trace.h">
|
||||
|
@ -43,7 +43,7 @@
|
|||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="EspressoModuleInterface.rc">
|
||||
<ResourceCompile Include="AwakeModuleInterface.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
|
@ -4,7 +4,7 @@
|
|||
#include <common/interop/shared_constants.h>
|
||||
#include "trace.h"
|
||||
#include "resource.h"
|
||||
#include "EspressoConstants.h"
|
||||
#include "AwakeConstants.h"
|
||||
#include <common/logger/logger.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.
|
||||
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.
|
||||
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.
|
||||
class Espresso : public PowertoyModuleIface
|
||||
class Awake : public PowertoyModuleIface
|
||||
{
|
||||
std::wstring app_name;
|
||||
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
|
||||
HANDLE send_telemetry_event;
|
||||
|
||||
// Handle to event used to invoke Espresso
|
||||
// Handle to event used to invoke PowerToys Awake
|
||||
HANDLE m_hInvokeEvent;
|
||||
|
||||
bool is_process_running()
|
||||
|
@ -65,21 +65,21 @@ private:
|
|||
|
||||
void launch_process()
|
||||
{
|
||||
Logger::trace(L"Launching Espresso process");
|
||||
Logger::trace(L"Launching PowerToys Awake process");
|
||||
unsigned long powertoys_pid = GetCurrentProcessId();
|
||||
|
||||
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) };
|
||||
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.lpParameters = executable_args.data();
|
||||
if (!ShellExecuteExW(&sei))
|
||||
{
|
||||
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);
|
||||
Logger::error(message);
|
||||
}
|
||||
|
@ -89,12 +89,12 @@ private:
|
|||
|
||||
public:
|
||||
// Constructor
|
||||
Espresso()
|
||||
Awake()
|
||||
{
|
||||
app_name = GET_RESOURCE_STRING(IDS_ESPRESSO_NAME);
|
||||
app_key = EspressoConstants::ModuleKey;
|
||||
app_name = GET_RESOURCE_STRING(IDS_AWAKE_NAME);
|
||||
app_key = AwakeConstants::ModuleKey;
|
||||
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::info("Launcher object is constructing");
|
||||
};
|
||||
|
@ -177,5 +177,5 @@ public:
|
|||
|
||||
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
|
||||
{
|
||||
return new Espresso();
|
||||
return new Awake();
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// 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
|
||||
//
|
|
@ -1,7 +0,0 @@
|
|||
#include <string>
|
||||
|
||||
namespace EspressoConstants
|
||||
{
|
||||
// Name of the powertoy module.
|
||||
inline const std::wstring ModuleKey = L"Espresso";
|
||||
}
|
|
@ -153,7 +153,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe)
|
|||
L"modules/PowerRename/PowerRenameExt.dll",
|
||||
L"modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.dll",
|
||||
L"modules/ColorPicker/ColorPicker.dll",
|
||||
L"modules/Espresso/EspressoModuleInterface.dll",
|
||||
L"modules/Awake/AwakeModuleInterface.dll",
|
||||
};
|
||||
|
||||
for (const auto& moduleSubdir : knownModules)
|
||||
|
|
|
@ -6,30 +6,30 @@ using System.Text.Json.Serialization;
|
|||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class EspressoProperties
|
||||
public class AwakeProperties
|
||||
{
|
||||
public EspressoProperties()
|
||||
public AwakeProperties()
|
||||
{
|
||||
KeepDisplayOn = false;
|
||||
Mode = EspressoMode.PASSIVE;
|
||||
Mode = AwakeMode.PASSIVE;
|
||||
Hours = 0;
|
||||
Minutes = 0;
|
||||
}
|
||||
|
||||
[JsonPropertyName("espresso_keep_display_on")]
|
||||
[JsonPropertyName("awake_keep_display_on")]
|
||||
public bool KeepDisplayOn { get; set; }
|
||||
|
||||
[JsonPropertyName("espresso_mode")]
|
||||
public EspressoMode Mode { get; set; }
|
||||
[JsonPropertyName("awake_mode")]
|
||||
public AwakeMode Mode { get; set; }
|
||||
|
||||
[JsonPropertyName("espresso_hours")]
|
||||
[JsonPropertyName("awake_hours")]
|
||||
public uint Hours { get; set; }
|
||||
|
||||
[JsonPropertyName("espresso_minutes")]
|
||||
[JsonPropertyName("awake_minutes")]
|
||||
public uint Minutes { get; set; }
|
||||
}
|
||||
|
||||
public enum EspressoMode
|
||||
public enum AwakeMode
|
||||
{
|
||||
PASSIVE = 0,
|
||||
INDEFINITE = 1,
|
|
@ -7,20 +7,20 @@ using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
|||
|
||||
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 EspressoSettings()
|
||||
public AwakeSettings()
|
||||
{
|
||||
Name = ModuleName;
|
||||
Version = ModuleVersion;
|
||||
Properties = new EspressoProperties();
|
||||
Properties = new AwakeProperties();
|
||||
}
|
||||
|
||||
[JsonPropertyName("properties")]
|
||||
public EspressoProperties Properties { get; set; }
|
||||
public AwakeProperties Properties { get; set; }
|
||||
|
||||
public string GetModuleName()
|
||||
{
|
|
@ -143,18 +143,18 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||
}
|
||||
}
|
||||
|
||||
private bool espresso;
|
||||
private bool awake;
|
||||
|
||||
[JsonPropertyName("Espresso")]
|
||||
public bool Espresso
|
||||
[JsonPropertyName("Awake")]
|
||||
public bool Awake
|
||||
{
|
||||
get => espresso;
|
||||
get => awake;
|
||||
set
|
||||
{
|
||||
if (espresso != value)
|
||||
if (awake != value)
|
||||
{
|
||||
LogTelemetryEvent(value);
|
||||
espresso = value;
|
||||
awake = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,24 +2,21 @@
|
|||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// 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.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
public class SndEspressoSettings
|
||||
public class SndAwakeSettings
|
||||
{
|
||||
[JsonPropertyName("Espresso")]
|
||||
public EspressoSettings Settings { get; set; }
|
||||
[JsonPropertyName("Awake")]
|
||||
public AwakeSettings Settings { get; set; }
|
||||
|
||||
public SndEspressoSettings()
|
||||
public SndAwakeSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public SndEspressoSettings(EspressoSettings settings)
|
||||
public SndAwakeSettings(AwakeSettings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
|
@ -9,15 +9,15 @@ using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
|||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
{
|
||||
public class EspressoViewModel : Observable
|
||||
public class AwakeViewModel : Observable
|
||||
{
|
||||
private GeneralSettings GeneralSettingsConfig { get; set; }
|
||||
|
||||
private EspressoSettings Settings { get; set; }
|
||||
private AwakeSettings Settings { get; set; }
|
||||
|
||||
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.
|
||||
if (settingsRepository == null)
|
||||
|
@ -35,7 +35,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||
|
||||
Settings = moduleSettingsRepository.SettingsConfig;
|
||||
|
||||
_isEnabled = GeneralSettingsConfig.Enabled.Espresso;
|
||||
_isEnabled = GeneralSettingsConfig.Enabled.Awake;
|
||||
_keepDisplayOn = Settings.Properties.KeepDisplayOn;
|
||||
_mode = Settings.Properties.Mode;
|
||||
_hours = Settings.Properties.Hours;
|
||||
|
@ -54,7 +54,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||
{
|
||||
_isEnabled = value;
|
||||
|
||||
GeneralSettingsConfig.Enabled.Espresso = value;
|
||||
GeneralSettingsConfig.Enabled.Awake = value;
|
||||
OnPropertyChanged(nameof(IsEnabled));
|
||||
OnPropertyChanged(nameof(IsTimeConfigurationEnabled));
|
||||
|
||||
|
@ -67,10 +67,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||
|
||||
public bool IsTimeConfigurationEnabled
|
||||
{
|
||||
get => _mode == EspressoMode.TIMED && _isEnabled;
|
||||
get => _mode == AwakeMode.TIMED && _isEnabled;
|
||||
}
|
||||
|
||||
public EspressoMode Mode
|
||||
public AwakeMode Mode
|
||||
{
|
||||
get => _mode;
|
||||
set
|
||||
|
@ -140,8 +140,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||
OnPropertyChanged(propertyName);
|
||||
if (SendConfigMSG != null)
|
||||
{
|
||||
SndEspressoSettings outsettings = new SndEspressoSettings(Settings);
|
||||
SndModuleSettings<SndEspressoSettings> ipcMessage = new SndModuleSettings<SndEspressoSettings>(outsettings);
|
||||
SndAwakeSettings outsettings = new SndAwakeSettings(Settings);
|
||||
SndModuleSettings<SndAwakeSettings> ipcMessage = new SndModuleSettings<SndAwakeSettings>(outsettings);
|
||||
|
||||
var targetMessage = ipcMessage.ToJsonString();
|
||||
SendConfigMSG(targetMessage);
|
||||
|
@ -152,6 +152,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||
private uint _hours;
|
||||
private uint _minutes;
|
||||
private bool _keepDisplayOn;
|
||||
private EspressoMode _mode;
|
||||
private AwakeMode _mode;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
|
@ -8,7 +8,7 @@ using Windows.UI.Xaml.Data;
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -19,11 +19,11 @@ namespace Microsoft.PowerToys.Settings.UI.Converters
|
|||
|
||||
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 currentMode = (EspressoMode)value;
|
||||
var expectedMode = (AwakeMode)Enum.Parse(typeof(AwakeMode), parameter.ToString());
|
||||
var currentMode = (AwakeMode)value;
|
||||
|
||||
return currentMode.Equals(expectedMode);
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ namespace Microsoft.PowerToys.Settings.UI.Converters
|
|||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -105,7 +105,7 @@
|
|||
<Compile Include="Controls\ShortcutVisualControl.xaml.cs">
|
||||
<DependentUpon>ShortcutVisualControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Converters\EspressoModeToBoolConverter.cs" />
|
||||
<Compile Include="Converters\AwakeModeToBoolConverter.cs" />
|
||||
<Compile Include="Converters\ModuleEnabledToForegroundConverter.cs" />
|
||||
<Compile Include="Converters\UpdatingStateCannotDownloadToVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\UpdatingStateReadyToDownloadToVisibilityConverter.cs" />
|
||||
|
@ -126,8 +126,8 @@
|
|||
<Compile Include="OOBE\Enums\PowerToysModulesEnum.cs" />
|
||||
<Compile Include="OOBE\ViewModel\OobeShellViewModel.cs" />
|
||||
<Compile Include="OOBE\ViewModel\OobePowerToysModule.cs" />
|
||||
<Compile Include="OOBE\Views\OobeEspresso.xaml.cs">
|
||||
<DependentUpon>OobeEspresso.xaml</DependentUpon>
|
||||
<Compile Include="OOBE\Views\OobeAwake.xaml.cs">
|
||||
<DependentUpon>OobeAwake.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OOBE\Views\OobeColorPicker.xaml.cs">
|
||||
<DependentUpon>OobeColorPicker.xaml</DependentUpon>
|
||||
|
@ -166,8 +166,8 @@
|
|||
<Compile Include="Services\NavigationService.cs" />
|
||||
<Compile Include="ViewModels\Commands\ButtonClickCommand.cs" />
|
||||
<Compile Include="ViewModels\ShellViewModel.cs" />
|
||||
<Compile Include="Views\EspressoPage.xaml.cs">
|
||||
<DependentUpon>EspressoPage.xaml</DependentUpon>
|
||||
<Compile Include="Views\AwakePage.xaml.cs">
|
||||
<DependentUpon>AwakePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ColorPickerPage.xaml.cs">
|
||||
<DependentUpon>ColorPickerPage.xaml</DependentUpon>
|
||||
|
@ -208,7 +208,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<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\FluentIconsFileExplorerPreview.png" />
|
||||
<Content Include="Assets\FluentIcons\FluentIconsImageResizer.png" />
|
||||
|
@ -220,12 +220,12 @@
|
|||
<Content Include="Assets\FluentIcons\FluentIconsVideoConferenceMute.png" />
|
||||
<Content Include="Assets\Logo.scale-200.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\ImageResizer.png" />
|
||||
<Content Include="Assets\Modules\KBM.png" />
|
||||
<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\FileExplorer.png" />
|
||||
<Content Include="Assets\Modules\OOBE\ImageResizer.gif" />
|
||||
|
@ -308,7 +308,7 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OOBE\Views\OobeEspresso.xaml">
|
||||
<Page Include="OOBE\Views\OobeAwake.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
@ -384,7 +384,7 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\EspressoPage.xaml">
|
||||
<Page Include="Views\AwakePage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
@ -466,4 +466,4 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
|
@ -8,7 +8,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Enums
|
|||
{
|
||||
Overview = 0,
|
||||
ColorPicker,
|
||||
Espresso,
|
||||
Awake,
|
||||
FancyZones,
|
||||
FileExplorer,
|
||||
ImageResizer,
|
||||
|
|
|
@ -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:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.PowerToys.Settings.UI.OOBE.Views"
|
||||
|
@ -42,13 +42,13 @@
|
|||
AutomationProperties.HeadingLevel="Level3"
|
||||
Style="{StaticResource OobeSubtitleStyle}" />
|
||||
|
||||
<controls:ShortcutTextControl x:Uid="Oobe_Espresso_HowToUse" />
|
||||
<controls:ShortcutTextControl x:Uid="Oobe_Awake_HowToUse" />
|
||||
|
||||
<TextBlock x:Uid="Oobe_TipsAndTricks"
|
||||
AutomationProperties.HeadingLevel="Level3"
|
||||
Style="{StaticResource OobeSubtitleStyle}"/>
|
||||
|
||||
<controls:ShortcutTextControl x:Uid="Oobe_Espresso_TipsAndTricks" />
|
||||
<controls:ShortcutTextControl x:Uid="Oobe_Awake_TipsAndTricks" />
|
||||
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="4"
|
|
@ -2,7 +2,6 @@
|
|||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// 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.ViewModel;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
|
@ -14,14 +13,14 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class OobeEspresso : Page
|
||||
public sealed partial class OobeAwake : Page
|
||||
{
|
||||
public OobePowerToysModule ViewModel { get; set; }
|
||||
|
||||
public OobeEspresso()
|
||||
public OobeAwake()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModulesEnum.Espresso]);
|
||||
InitializeComponent();
|
||||
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModulesEnum.Awake]);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
|
@ -29,7 +28,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|||
{
|
||||
if (OobeShellPage.OpenMainWindowCallback != null)
|
||||
{
|
||||
OobeShellPage.OpenMainWindowCallback(typeof(EspressoPage));
|
||||
OobeShellPage.OpenMainWindowCallback(typeof(AwakePage));
|
||||
}
|
||||
|
||||
ViewModel.LogOpeningSettingsEvent();
|
|
@ -81,17 +81,17 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|||
Description = loader.GetString("Oobe_ColorPicker_Description"),
|
||||
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"),
|
||||
Tag = "Espresso",
|
||||
ModuleName = loader.GetString("Oobe_Awake"),
|
||||
Tag = "Awake",
|
||||
IsNew = false,
|
||||
Icon = "\uEC32",
|
||||
Image = "ms-appx:///Assets/Modules/Espresso.png",
|
||||
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsEspresso.png",
|
||||
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Espresso.png",
|
||||
Description = loader.GetString("Oobe_Espresso_Description"),
|
||||
Link = "https://aka.ms/PowerToysOverview_Espresso",
|
||||
Image = "ms-appx:///Assets/Modules/Awake.png",
|
||||
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsAwake.png",
|
||||
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Awake.png",
|
||||
Description = loader.GetString("Oobe_Awake_Description"),
|
||||
Link = "https://aka.ms/PowerToysOverview_Awake",
|
||||
});
|
||||
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 "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 "Run": NavigationFrame.Navigate(typeof(OobeRun)); break;
|
||||
case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break;
|
||||
|
|
|
@ -121,9 +121,9 @@
|
|||
<value>General</value>
|
||||
<comment>Navigation view item name for General</comment>
|
||||
</data>
|
||||
<data name="Shell_Espresso.Content" xml:space="preserve">
|
||||
<value>Espresso</value>
|
||||
<comment>Product name: Navigation view item name for Espresso</comment>
|
||||
<data name="Shell_Awake.Content" xml:space="preserve">
|
||||
<value>Awake</value>
|
||||
<comment>Product name: Navigation view item name for Awake</comment>
|
||||
</data>
|
||||
<data name="Shell_PowerLauncher.Content" xml:space="preserve">
|
||||
<value>PowerToys Run</value>
|
||||
|
@ -912,8 +912,8 @@
|
|||
<value>https://aka.ms/PowerToysOverview_ColorPicker</value>
|
||||
<comment>URL. Do not loc</comment>
|
||||
</data>
|
||||
<data name="Espresso_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve">
|
||||
<value>https://aka.ms/PowerToysOverview_Espresso</value>
|
||||
<data name="Awake_ImageHyperlinkToDocs.NavigateUri" xml:space="preserve">
|
||||
<value>https://aka.ms/PowerToysOverview_Awake</value>
|
||||
<comment>URL. Do not loc</comment>
|
||||
</data>
|
||||
<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">
|
||||
<value>PowerToys Settings</value>
|
||||
</data>
|
||||
<data name="About_Espresso.Text" xml:space="preserve">
|
||||
<value>About Espresso</value>
|
||||
<data name="About_Awake.Text" xml:space="preserve">
|
||||
<value>About Awake</value>
|
||||
</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>
|
||||
</data>
|
||||
<data name="Espresso_EnableEspresso.Header" xml:space="preserve">
|
||||
<value>Enable Espresso</value>
|
||||
<data name="Awake_EnableAwake.Header" xml:space="preserve">
|
||||
<value>Enable Awake</value>
|
||||
</data>
|
||||
<data name="Espresso_NoKeepAwakeContent.Text" xml:space="preserve">
|
||||
<data name="Awake_NoKeepAwakeContent.Text" xml:space="preserve">
|
||||
<value>Off (Passive)</value>
|
||||
</data>
|
||||
<data name="Espresso_IndefiniteKeepAwakeContent.Text" xml:space="preserve">
|
||||
<data name="Awake_IndefiniteKeepAwakeContent.Text" xml:space="preserve">
|
||||
<value>Keep awake indefinitely</value>
|
||||
</data>
|
||||
<data name="Espresso_TemporaryKeepAwakeContent.Text" xml:space="preserve">
|
||||
<data name="Awake_TemporaryKeepAwakeContent.Text" xml:space="preserve">
|
||||
<value>Keep awake temporarily</value>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</data>
|
||||
<data name="Espresso_EnableDisplayKeepAwake.Content" xml:space="preserve">
|
||||
<data name="Awake_EnableDisplayKeepAwake.Content" xml:space="preserve">
|
||||
<value>Keep screen on</value>
|
||||
</data>
|
||||
<data name="Espresso_Mode.Text" xml:space="preserve">
|
||||
<data name="Awake_Mode.Text" xml:space="preserve">
|
||||
<value>Mode</value>
|
||||
</data>
|
||||
<data name="Espresso_Behavior_GroupSettings.Text" xml:space="preserve">
|
||||
<data name="Awake_Behavior_GroupSettings.Text" xml:space="preserve">
|
||||
<value>Behavior</value>
|
||||
</data>
|
||||
<data name="Espresso_TemporaryKeepAwake_Hours.Header" xml:space="preserve">
|
||||
<data name="Awake_TemporaryKeepAwake_Hours.Header" xml:space="preserve">
|
||||
<value>Hours</value>
|
||||
</data>
|
||||
<data name="Espresso_TemporaryKeepAwake_Minutes.Header" xml:space="preserve">
|
||||
<data name="Awake_TemporaryKeepAwake_Minutes.Header" xml:space="preserve">
|
||||
<value>Minutes</value>
|
||||
</data>
|
||||
<data name="Espresso_ModuleAttributionLabel.Text" xml:space="preserve">
|
||||
<value>Den Delimarsky's Espresso</value>
|
||||
<data name="Awake_ModuleAttributionLabel.Text" xml:space="preserve">
|
||||
<value>Den Delimarsky's Awake</value>
|
||||
</data>
|
||||
<data name="Espresso_ModuleAttributionHyperlink.NavigateUri" xml:space="preserve">
|
||||
<value>https://espresso.den.dev</value>
|
||||
<data name="Awake_ModuleAttributionHyperlink.NavigateUri" xml:space="preserve">
|
||||
<value>https://Awake.den.dev</value>
|
||||
<comment>URL. Do not loc</comment>
|
||||
</data>
|
||||
<data name="Oobe_Espresso" xml:space="preserve">
|
||||
<value>Espresso</value>
|
||||
<data name="Oobe_Awake" xml:space="preserve">
|
||||
<value>Awake</value>
|
||||
<comment>Module name, do not loc</comment>
|
||||
</data>
|
||||
<data name="Oobe_Espresso_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>
|
||||
<data name="Oobe_Awake_Description" xml:space="preserve">
|
||||
<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 name="Oobe_Espresso_HowToUse.Text" xml:space="preserve">
|
||||
<value>Open {PowerToys Settings} and enable Espresso</value>
|
||||
<data name="Oobe_Awake_HowToUse.Text" xml:space="preserve">
|
||||
<value>Open {PowerToys Settings} and enable Awake</value>
|
||||
</data>
|
||||
<data name="Oobe_Espresso_TipsAndTricks.Text" xml:space="preserve">
|
||||
<value>You can always change modes quickly by {right-clicking the Espresso icon} in the system tray.</value>
|
||||
<data name="Oobe_Awake_TipsAndTricks.Text" xml:space="preserve">
|
||||
<value>You can always change modes quickly by {right-clicking the Awake icon} in the system tray.</value>
|
||||
</data>
|
||||
<data name="General_FailedToDownloadTheNewVersion.Text" xml:space="preserve">
|
||||
<value>An error occurred trying to update to</value>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<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:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
@ -13,7 +13,7 @@
|
|||
AutomationProperties.LandmarkType="Main">
|
||||
|
||||
<Page.Resources>
|
||||
<c:EspressoModeToBoolConverter x:Key="EspressoModeToBoolConverter" />
|
||||
<c:AwakeModeToBoolConverter x:Key="AwakeModeToBoolConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<Grid RowSpacing="{StaticResource DefaultRowSpacing}">
|
||||
|
@ -50,68 +50,70 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Vertical"
|
||||
x:Name="EspressoView"
|
||||
x:Name="AwakeView"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="0,0,48,0"
|
||||
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}}"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
|
||||
<CheckBox x:Uid="Espresso_EnableDisplayKeepAwake"
|
||||
<CheckBox x:Uid="Awake_EnableDisplayKeepAwake"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
IsChecked="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}"
|
||||
Margin="{StaticResource XSmallTopMargin}" />
|
||||
|
||||
<TextBlock x:Uid="Espresso_Mode"
|
||||
<TextBlock x:Uid="Awake_Mode"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
x:Name="ModeTitleLabel"
|
||||
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}" />
|
||||
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}">
|
||||
<RadioButton x:Uid="Espresso_NoKeepAwake"
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"
|
||||
Margin="0,-8,0,0">
|
||||
<RadioButton x:Uid="Awake_NoKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
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>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Espresso_NoKeepAwakeContent"/>
|
||||
<Run x:Uid="Awake_NoKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Espresso_NoKeepAwakeDescription"/>
|
||||
x:Uid="Awake_NoKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Espresso_IndefiniteKeepAwake"
|
||||
<RadioButton x:Uid="Awake_IndefiniteKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
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>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Espresso_IndefiniteKeepAwakeContent"/>
|
||||
<Run x:Uid="Awake_IndefiniteKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Espresso_IndefiniteKeepAwakeDescription"/>
|
||||
x:Uid="Awake_IndefiniteKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Espresso_TemporaryKeepAwake"
|
||||
<RadioButton x:Uid="Awake_TemporaryKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
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>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Espresso_TemporaryKeepAwakeContent"/>
|
||||
<Run x:Uid="Awake_TemporaryKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Espresso_TemporaryKeepAwakeDescription"/>
|
||||
x:Uid="Awake_TemporaryKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
|
||||
<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}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
|
@ -120,7 +122,7 @@
|
|||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
<muxc:NumberBox x:Uid="Espresso_TemporaryKeepAwake_Minutes"
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
|
||||
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
|
@ -139,12 +141,12 @@
|
|||
Width="{StaticResource SidePanelWidth}"
|
||||
Grid.Column="1">
|
||||
<StackPanel x:Name="DescriptionPanel">
|
||||
<TextBlock x:Uid="About_Espresso"
|
||||
<TextBlock x:Uid="About_Awake"
|
||||
x:Name="AboutTitle"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Margin="{StaticResource XSmallBottomMargin}"/>
|
||||
<TextBlock x:Uid="Espresso_Description"
|
||||
<TextBlock x:Uid="Awake_Description"
|
||||
TextWrapping="Wrap"
|
||||
Grid.Row="1" />
|
||||
</StackPanel>
|
||||
|
@ -156,15 +158,15 @@
|
|||
HorizontalAlignment="Left"
|
||||
Margin="{StaticResource SmallTopBottomMargin}"
|
||||
RelativePanel.Below="DescriptionPanel">
|
||||
<HyperlinkButton x:Uid="Espresso_ImageHyperlinkToDocs">
|
||||
<Image x:Uid="Espresso_Image" Source="ms-appx:///Assets/Modules/Espresso.png" />
|
||||
<HyperlinkButton x:Uid="Awake_ImageHyperlinkToDocs">
|
||||
<Image x:Uid="Awake_Image" Source="ms-appx:///Assets/Modules/Awake.png" />
|
||||
</HyperlinkButton>
|
||||
</Border>
|
||||
<StackPanel x:Name="LinksPanel"
|
||||
Margin="0,1,0,0"
|
||||
RelativePanel.Below="AboutImage"
|
||||
Orientation="Vertical" >
|
||||
<HyperlinkButton x:Uid="Espresso_ImageHyperlinkToDocs">
|
||||
<HyperlinkButton x:Uid="Awake_ImageHyperlinkToDocs">
|
||||
<TextBlock x:Uid="Module_overview" />
|
||||
</HyperlinkButton>
|
||||
<HyperlinkButton NavigateUri="https://aka.ms/powerToysGiveFeedback">
|
||||
|
@ -176,11 +178,11 @@
|
|||
Style="{StaticResource SettingsGroupTitleStyle}" />
|
||||
|
||||
<HyperlinkButton Margin="0,-3,0,0"
|
||||
x:Uid="Espresso_ModuleAttributionHyperlink">
|
||||
<TextBlock x:Uid="Espresso_ModuleAttributionLabel"
|
||||
x:Uid="Awake_ModuleAttributionHyperlink">
|
||||
<TextBlock x:Uid="Awake_ModuleAttributionLabel"
|
||||
TextWrapping="Wrap" />
|
||||
</HyperlinkButton>
|
||||
</StackPanel>
|
||||
</RelativePanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
</Page>
|
|
@ -8,14 +8,14 @@ using Windows.UI.Xaml.Controls;
|
|||
|
||||
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();
|
||||
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;
|
||||
InitializeComponent();
|
||||
}
|
|
@ -42,7 +42,7 @@
|
|||
</winui:NavigationViewItem.Icon>
|
||||
</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>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace
|
|||
{
|
||||
L"PowerToys.exe",
|
||||
L"ColorPickerUI.exe",
|
||||
L"PowerToys.Espresso.exe"
|
||||
L"PowerToys.Awake.exe"
|
||||
L"FancyZonesEditor.exe",
|
||||
L"PowerToys.KeyboardManagerEngine.exe",
|
||||
L"PowerToys.KeyboardManagerEditor.exe",
|
||||
|
|