mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Refactor IPC and enhance PowerDisplay functionality
Refactored IPC communication by introducing a `NamedPipeProcessor` utility for unidirectional named pipe handling, replacing the old bidirectional implementation. Simplified application lifecycle management by removing mutex usage and relying on `AppInstance` for single-instance enforcement. Replaced IPC-based monitor updates with file-based updates, saving monitor data to `settings.json` for the Settings UI. Added an `ActivationShortcut` property to PowerDisplay settings and updated the settings page UI to support shortcut configuration. Simplified named pipe creation in `PowerDisplayProcessManager` by removing bidirectional pipe logic and focusing on unidirectional communication. Improved `MainWindow` initialization with an `EnsureInitializedAsync` method. Updated localization resources and integrated PowerDisplay into the launcher menu. Removed redundant code, improved logging, and streamlined resource cleanup for better maintainability.
This commit is contained in:
@@ -87,6 +87,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
set => SetSettingsProperty(_settings.Properties.RestoreSettingsOnStartup, value, v => _settings.Properties.RestoreSettingsOnStartup = v);
|
||||
}
|
||||
|
||||
public HotkeySettings ActivationShortcut
|
||||
{
|
||||
get => _settings.Properties.ActivationShortcut;
|
||||
set => SetSettingsProperty(_settings.Properties.ActivationShortcut, value, v => _settings.Properties.ActivationShortcut = v);
|
||||
}
|
||||
|
||||
public string BrightnessUpdateRate
|
||||
{
|
||||
get => _settings.Properties.BrightnessUpdateRate;
|
||||
|
||||
Reference in New Issue
Block a user