graphics() added display position windows
This commit is contained in:
parent
52c061d0dc
commit
2e405a6e08
@ -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 |
|
||||
|
||||
@ -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
|
||||
|
||||
@ -83,6 +83,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">4.14.1</th>
|
||||
<td>2019-07-04</td>
|
||||
<td><span class="code">graphics()</span> added display position windows</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">4.14.0</th>
|
||||
<td>2019-07-03</td>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span></div>
|
||||
<div class="version">Current Version: <span id="version">4.14.0</span></div>
|
||||
<div class="version">Current Version: <span id="version">4.14.1</span></div>
|
||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||
</div>
|
||||
<div class="down">
|
||||
|
||||
@ -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', '=')),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
2
lib/index.d.ts
vendored
2
lib/index.d.ts
vendored
@ -179,6 +179,8 @@ export namespace Systeminformation {
|
||||
resolutiony: number;
|
||||
currentResX: number;
|
||||
currentResY: number;
|
||||
positionX: number;
|
||||
positionY: number;
|
||||
currentRefreshRate: number;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user