Add custom-monitor-product setting

This commit is contained in:
wheaney 2024-08-17 10:52:27 -07:00
parent 4879d31803
commit 58cd31f129
2 changed files with 11 additions and 1 deletions

View File

@ -129,7 +129,8 @@ export default class BreezyDesktopExtension extends Extension {
try { try {
Globals.logger.log_debug('BreezyDesktopExtension _find_supported_monitor'); Globals.logger.log_debug('BreezyDesktopExtension _find_supported_monitor');
const target_monitor = this._monitor_manager.getMonitorPropertiesList()?.find( const target_monitor = this._monitor_manager.getMonitorPropertiesList()?.find(
monitor => SUPPORTED_MONITOR_PRODUCTS.includes(monitor.product)); monitor => SUPPORTED_MONITOR_PRODUCTS.includes(monitor.product) ||
this.settings.get_string('custom-monitor-product') === monitor.product);
if (target_monitor !== undefined) { if (target_monitor !== undefined) {
Globals.logger.log(`Identified supported monitor: ${target_monitor.product} on ${target_monitor.connector}`); Globals.logger.log(`Identified supported monitor: ${target_monitor.product} on ${target_monitor.connector}`);
return { return {

View File

@ -162,6 +162,15 @@
<description> <description>
Log debug messages Log debug messages
</description> </description>
</key>
<key name="custom-monitor-product" type="s">
<default>
""
</default>
<summary>Custom monitor product</summary>
<description>
Custom monitor product
</description>
</key> </key>
</schema> </schema>
</schemalist> </schemalist>