2026-02-03 13:53:25 +08:00
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
|
// 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.Collections.Generic;
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
using PowerDisplay.Common.Models;
|
|
|
|
|
using Settings.UI.Library.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
|
|
|
{
|
|
|
|
|
public class PowerDisplayProperties
|
|
|
|
|
{
|
|
|
|
|
[CmdConfigureIgnore]
|
|
|
|
|
public HotkeySettings DefaultActivationShortcut => new HotkeySettings(true, true, false, true, 0x44); // Ctrl+Shift+Win+D (win, ctrl, alt, shift, code)
|
|
|
|
|
|
|
|
|
|
public PowerDisplayProperties()
|
|
|
|
|
{
|
|
|
|
|
ActivationShortcut = DefaultActivationShortcut;
|
|
|
|
|
MonitorRefreshDelay = 5;
|
|
|
|
|
Monitors = new List<MonitorInfo>();
|
|
|
|
|
RestoreSettingsOnStartup = false;
|
|
|
|
|
ShowSystemTrayIcon = true;
|
|
|
|
|
ShowProfileSwitcher = true;
|
|
|
|
|
ShowIdentifyMonitorsButton = true;
|
2026-02-05 17:02:55 +08:00
|
|
|
CustomVcpMappings = new List<CustomVcpValueMapping>();
|
2026-02-03 13:53:25 +08:00
|
|
|
|
|
|
|
|
// Note: saved_monitor_settings has been moved to monitor_state.json
|
|
|
|
|
// which is managed separately by PowerDisplay app
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("activation_shortcut")]
|
|
|
|
|
public HotkeySettings ActivationShortcut { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets delay in seconds before refreshing monitors after display changes (hot-plug).
|
|
|
|
|
/// This allows hardware to stabilize before querying DDC/CI.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("monitor_refresh_delay")]
|
|
|
|
|
public int MonitorRefreshDelay { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("monitors")]
|
|
|
|
|
public List<MonitorInfo> Monitors { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("restore_settings_on_startup")]
|
|
|
|
|
public bool RestoreSettingsOnStartup { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("show_system_tray_icon")]
|
|
|
|
|
public bool ShowSystemTrayIcon { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets whether to show the profile switcher button in the flyout UI.
|
|
|
|
|
/// Default is true. When false, the profile switcher is hidden (but profiles still work via Settings).
|
|
|
|
|
/// Note: Also hidden when no profiles exist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("show_profile_switcher")]
|
|
|
|
|
public bool ShowProfileSwitcher { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets whether to show the identify monitors button in the flyout UI.
|
|
|
|
|
/// Default is true.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("show_identify_monitors_button")]
|
|
|
|
|
public bool ShowIdentifyMonitorsButton { get; set; }
|
2026-02-05 17:02:55 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets custom VCP value name mappings shared across all monitors.
|
|
|
|
|
/// Allows users to define custom names for color temperature presets and input sources.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("custom_vcp_mappings")]
|
|
|
|
|
public List<CustomVcpValueMapping> CustomVcpMappings { get; set; }
|
2026-02-03 13:53:25 +08:00
|
|
|
}
|
|
|
|
|
}
|