diff --git a/CHANGELOG.md b/CHANGELOG.md index c40cf61..e2946a6 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.14.1 | 2019-07-04 | `graphics()` added display position windows | | 4.14.0 | 2019-07-03 | `processes()` added process path and params | | 4.13.2 | 2019-07-02 | `versions()` fix getting all versions | | 4.13.1 | 2019-07-01 | `versions()` gcc fix macos | diff --git a/README.md b/README.md index 2a08fbc..ce10d1a 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,8 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | ...[0].resolutiony | X | | X | X | | pixel vertical | | | ...[0].currentResX | X | | X | X | | current pixel horizontal | | | ...[0].currentResY | X | | X | X | | current pixel vertical | +| | ...[0].positionX | | | | X | | display position X | +| | ...[0].positionY | | | | X | | display position Y | | | ...[0].currentRefreshRate | X | | X | X | | current pixel vertical | #### 7. Operating System diff --git a/docs/history.html b/docs/history.html index 8e89aee..e9f6dca 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.14.1 + 2019-07-04 + graphics() added display position windows + 4.14.0 2019-07-03 diff --git a/docs/index.html b/docs/index.html index 2dce217..9124f73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.14.0
+
Current Version: 4.14.1
diff --git a/lib/graphics.js b/lib/graphics.js index f016509..dfc3f6f 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -82,6 +82,8 @@ function graphics(callback) { resolutiony: -1, currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }; for (let i = 0; i < lines.length; i++) { @@ -117,6 +119,8 @@ function graphics(callback) { resolutiony: -1, currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }; } @@ -145,6 +149,8 @@ function graphics(callback) { currentDisplay.connection = ''; currentDisplay.sizex = -1; currentDisplay.sizey = -1; + currentDisplay.positionX = 0; + currentDisplay.positionY = 0; currentDisplay.pixeldepth = -1; } } @@ -302,6 +308,8 @@ function graphics(callback) { resolutiony: -1, currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }; // find first "Detailed Timing Description" @@ -359,6 +367,8 @@ function graphics(callback) { resolutiony: -1, currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }; let is_edid = false; @@ -383,6 +393,8 @@ function graphics(callback) { resolutiony: -1, currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }; } @@ -481,6 +493,8 @@ function graphics(callback) { resolutiony: parseInt(parts[1], 10), currentResX: -1, currentResY: -1, + positionX: 0, + positionY: 0, currentRefreshRate: -1 }); } @@ -703,6 +717,8 @@ function graphics(callback) { pixeldepth: bitsPerPixel, currentResX: util.toInt(util.getValue(bounds, 'Width', '=')), currentResY: util.toInt(util.getValue(bounds, 'Height', '=')), + positionX: util.toInt(util.getValue(bounds, 'X', '=')), + positionY: util.toInt(util.getValue(bounds, 'Y', '=')), }); } } diff --git a/lib/index.d.ts b/lib/index.d.ts index 58924f3..73b8e9a 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -179,6 +179,8 @@ export namespace Systeminformation { resolutiony: number; currentResX: number; currentResY: number; + positionX: number; + positionY: number; currentRefreshRate: number; } diff --git a/lib/processes.js b/lib/processes.js index b119a1d..34b1fc0 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -470,8 +470,8 @@ function processes(callback) { let command = ''; let params = ''; // try to figure out where parameter starts - let firstParamPos = fullcommand.indexOf(' -') - let firstParamPathPos = fullcommand.indexOf(' /') + let firstParamPos = fullcommand.indexOf(' -'); + let firstParamPathPos = fullcommand.indexOf(' /'); firstParamPos = (firstParamPos >= 0 ? firstParamPos : 10000); firstParamPathPos = (firstParamPathPos >= 0 ? firstParamPathPos : 10000); const firstPos = Math.min(firstParamPos, firstParamPathPos); diff --git a/lib/system.js b/lib/system.js index 0c7490a..4ffac25 100644 --- a/lib/system.js +++ b/lib/system.js @@ -96,7 +96,7 @@ function system(callback) { result.serial = util.getValue(lines, 'serial', ':', true); // reference values: https://elinux.org/RPi_HardwareHistory - https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md + // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md if (result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2835' || result.model === 'BCM2837') { // Pi 4