From 3616f1eb838c8e6e460b58236cc88a1551eb1dbe Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 14 Jun 2019 16:13:21 +0200 Subject: [PATCH] graphics() windows multiple display support --- CHANGELOG.md | 1 + README.md | 13 +++++++------ docs/graphics.html | 10 +++++----- docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/graphics.js | 14 +++++++------- 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d65bc..0feb52d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.10.0 | 2019-06-14 | `graphics()` windows multiple display support | | 4.9.2 | 2019-06-12 | type definitions bug fix | | 4.9.1 | 2019-06-11 | `networkStats()` bug fix windows | | 4.9.0 | 2019-06-03 | `graphics()` added vendor, refresh rate, current res | diff --git a/README.md b/README.md index 886fc04..eea37ea 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,8 @@ si.cpu() (last 7 major and minor version releases) -- Version 4.9.0: added `graphics()` added vendor, refresh rate, current resolution +- Version 4.10.0: `graphics()` added windows multiple display support, added display size, connection, ... +- Version 4.9.0: `graphics()` added vendor, refresh rate, current resolution - Version 4.8.0: added `vboxInfo()` detailed virtual box info - Version 4.7.0: partial NetBSD support - Version 4.6.0: added `dockerInfo()` @@ -253,13 +254,13 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | ...[0].vram | X | | X | X | | VRAM size (in MB) | | | ...[0].vramDynamic | X | | X | X | | true if dynamicly allocated ram | | | displays[] | X | | X | X | | monitor/display array | -| | ...[0].vendor | | | X | | | monitor/display vendor | +| | ...[0].vendor | | | | X | | monitor/display vendor | | | ...[0].model | X | | X | X | | monitor/display model | -| | ...[0].main | X | | X | | | true if main monitor | +| | ...[0].main | X | | X | X| | true if main monitor | | | ...[0].builtin | X | | X | | | true if built in monitor | -| | ...[0].connection | X | | X | | | e.g. DisplayPort or HDMI | -| | ...[0].sizex | X | | X | | | size in mm horizontal | -| | ...[0].sizey | X | | X | | | size in mm vertical | +| | ...[0].connection | X | | X | X | | e.g. DisplayPort or HDMI | +| | ...[0].sizex | X | | X | X | | size in mm horizontal | +| | ...[0].sizey | X | | X | X | | size in mm vertical | | | ...[0].pixeldepth | X | | X | X | | color depth in bits | | | ...[0].resolutionx | X | | X | X | | pixel horizontal | | | ...[0].resolutiony | X | | X | X | | pixel vertical | diff --git a/docs/graphics.html b/docs/graphics.html index a82b45e..9847c86 100644 --- a/docs/graphics.html +++ b/docs/graphics.html @@ -150,8 +150,8 @@ ...[0].vendor - X + X monitor/display vendor @@ -171,7 +171,7 @@ X X - + X true if main monitor @@ -191,7 +191,7 @@ X X - + X e.g. DisplayPort, HDMI @@ -201,7 +201,7 @@ X X - + X size in mm horizontal @@ -211,7 +211,7 @@ X X - + X size in mm vertical diff --git a/docs/history.html b/docs/history.html index 7ac9ec7..1395be7 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,6 +80,11 @@ + + 4.10.0 + 2019-06-14 + graphics() rewrite windows, added featues + 4.9.2 2019-06-12 diff --git a/docs/index.html b/docs/index.html index a9b4b3e..b73ca3c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.9.2
+
Current Version: 4.10.0
@@ -191,7 +191,7 @@
-
8,733
+
8,833
Lines of code
diff --git a/lib/graphics.js b/lib/graphics.js index 0c57515..aed4a1f 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -38,17 +38,17 @@ const videoTypes = { '-1': 'OTHER', '0': 'HD15', '1': 'SVIDEO', - '2': 'COMPOSITE_VIDEO', - '3': 'COMPONENT_VIDEO', + '2': 'Composite video', + '3': 'Component video', '4': 'DVI', '5': 'HDMI', '6': 'LVDS', '8': 'D_JPN', '9': 'SDI', - '10': 'DISPLAYPORT_EXTERNAL', - '11': 'DISPLAYPORT_EMBEDDED', - '12': 'UDI_EXTERNAL', - '13': 'UDI_EMBEDDED', + '10': 'DP', + '11': 'DP embedded', + '12': 'UDI', + '13': 'UDI embedded', '14': 'SDTVDONGLE', '15': 'MIRACAST', '0x80000000': 'INTERNAL' @@ -702,7 +702,7 @@ function graphics(callback) { sizey: sizey ? parseInt(sizey, 10) : -1, pixeldepth: bitsPerPixel, currentResX: util.toInt(util.getValue(bounds, 'Width', '=')), - currentResY: util.toInt(util.getValue(bounds, 'Width', '=')), + currentResY: util.toInt(util.getValue(bounds, 'Height', '=')), }); } }