aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmonitor-parse-edid11
1 files changed, 8 insertions, 3 deletions
diff --git a/monitor-parse-edid b/monitor-parse-edid
index e35516a..6aa9faa 100755
--- a/monitor-parse-edid
+++ b/monitor-parse-edid
@@ -385,10 +385,15 @@ sub to_MonitorsDB {
join('x', $_->{horizontal_active}, $_->{vertical_active});
} grep { !$_->{bad_ratio} } @$detailed_timings;
+ (my $monitor_name = $edid->{monitor_name}) =~ s/;/,/g;
+ my ($raw_vendor, $raw_model) = $edid->{EISA_ID} =~ /(...)(.*)/;
+ my ($VendorName, $only_Model) =
+ $monitor_name =~ /(\S+)\s(.*)/ ?
+ ($1, $2) :
+ ($raw_vendor, $monitor_name || $raw_model);
+
join('; ',
- $edid->{monitor_name} =~ /(\S+)/ ? $1 : $edid->{EISA_ID} =~ /(...)/ && $1,
- $edid->{monitor_name} ? $edid->{monitor_name} : $edid->{EISA_ID} =~ /...(.*)/ && $1,
- $edid->{EISA_ID},
+ $VendorName, "$VendorName $only_Model", $edid->{EISA_ID},
sprintf("%u-%u", $edid->{monitor_range}{horizontal_min}, $edid->{monitor_range}{horizontal_max}),
sprintf("%u-%u", $edid->{monitor_range}{vertical_min}, $edid->{monitor_range}{vertical_max}),
@$detailed_timings == 1 ? @preferred_resolutions : (),