about-system 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/about-system.js +14 -4
- package/package.json +3 -5
package/about-system.js
CHANGED
|
@@ -70,10 +70,10 @@ const DEFAULT_SETTINGS = {
|
|
|
70
70
|
city: "green",
|
|
71
71
|
domain: "gray",
|
|
72
72
|
isp: "lightblue",
|
|
73
|
-
os: "
|
|
73
|
+
os: "gray",
|
|
74
74
|
cpu: "orange",
|
|
75
75
|
gpu: "yellow",
|
|
76
|
-
device: "
|
|
76
|
+
device: "yellow",
|
|
77
77
|
kernel: "green",
|
|
78
78
|
shell: "orange",
|
|
79
79
|
pacman: "multicolor",
|
|
@@ -106,7 +106,17 @@ const DEFAULT_SETTINGS = {
|
|
|
106
106
|
multiline: true,
|
|
107
107
|
group_similar: true,
|
|
108
108
|
single_line: false,
|
|
109
|
-
|
|
109
|
+
line_wrap_length: (() => {
|
|
110
|
+
try {
|
|
111
|
+
const { execSync } = require('child_process');
|
|
112
|
+
const size = execSync('stty size', { encoding: 'utf8' }).trim();
|
|
113
|
+
const cols = parseInt(size.split(' ')[1]);
|
|
114
|
+
console.log(cols)
|
|
115
|
+
return cols > 0 ? cols : 100; // fallback to 100 if stty fails
|
|
116
|
+
} catch (error) {
|
|
117
|
+
return 100; // fallback to 100 if stty is not available
|
|
118
|
+
}
|
|
119
|
+
})()
|
|
110
120
|
},
|
|
111
121
|
advanced: {
|
|
112
122
|
debug: false,
|
|
@@ -1151,7 +1161,7 @@ async function displaySystemInfo() {
|
|
|
1151
1161
|
// Normal multi-line grouped display with intelligent wrapping
|
|
1152
1162
|
const lines = [];
|
|
1153
1163
|
let currentLine = '';
|
|
1154
|
-
const maxLineLength = settings.display.line_wrap_length ||
|
|
1164
|
+
const maxLineLength = settings.display.line_wrap_length || 120;
|
|
1155
1165
|
|
|
1156
1166
|
for (const group of settings.display_order) {
|
|
1157
1167
|
for (const key of group) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "about-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "A Node.js script to display key system information with emojis. Cross-platform support for Windows, macOS, and Linux with customizable output and caching.",
|
|
5
5
|
"main": "about-system.js",
|
|
6
6
|
"bin": {
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
],
|
|
33
33
|
"author": "vtempest",
|
|
34
34
|
"license": "MIT",
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=12.0.0"
|
|
37
|
-
},
|
|
38
35
|
"repository": {
|
|
39
36
|
"type": "git",
|
|
40
37
|
"url": "https://github.com/vtempest/server-shell-setup.git"
|
|
@@ -48,7 +45,8 @@
|
|
|
48
45
|
"os": [
|
|
49
46
|
"win32",
|
|
50
47
|
"darwin",
|
|
51
|
-
"linux"
|
|
48
|
+
"linux",
|
|
49
|
+
"android"
|
|
52
50
|
],
|
|
53
51
|
"preferGlobal": true,
|
|
54
52
|
"directories": {
|