about-system 0.0.10 → 0.0.12
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/package.json +1 -1
- package/src/about-system.js +31 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "about-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
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": "src/about-system.js",
|
|
6
6
|
"bin": {
|
package/src/about-system.js
CHANGED
|
@@ -574,38 +574,38 @@ const infoFunctions = {
|
|
|
574
574
|
if (cached) return cached;
|
|
575
575
|
|
|
576
576
|
if (IS_WINDOWS) {
|
|
577
|
-
try {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
} catch {}
|
|
577
|
+
// try {
|
|
578
|
+
// // Get disk usage for C: drive using PowerShell
|
|
579
|
+
// const ps = execCommand('powershell.exe -Command "Get-WmiObject -Class Win32_LogicalDisk -Filter \'DeviceID="C:"\' | Select-Object @{Name=\'PercentFree\';Expression={[math]::Round((($_.FreeSpace / $_.Size) * 100), 0)}} | Select-Object -ExpandProperty PercentFree"');
|
|
580
|
+
// if (ps.trim()) {
|
|
581
|
+
// const percentFree = parseInt(ps.trim());
|
|
582
|
+
// const percentUsed = 100 - percentFree;
|
|
583
|
+
// const color = colors[settings.colors.disk_used] || colors.purple;
|
|
584
|
+
// const emoji = settings.display.show_emojis ? '📁 ' : '';
|
|
585
|
+
// const result = `${color}${emoji}${percentUsed}%`;
|
|
586
|
+
// setCachedValue(this.cache, 'disk_used', result);
|
|
587
|
+
// return result;
|
|
588
|
+
// }
|
|
589
|
+
// } catch {}
|
|
590
590
|
|
|
591
|
-
// Fallback using WMIC
|
|
592
|
-
try {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
591
|
+
// // Fallback using WMIC
|
|
592
|
+
// try {
|
|
593
|
+
// const wmic = execCommand('wmic logicaldisk where "DeviceID=\'C:\'" get Size,FreeSpace /format:list');
|
|
594
|
+
// const sizeMatch = wmic.match(/Size=(\d+)/);
|
|
595
|
+
// const freeMatch = wmic.match(/FreeSpace=(\d+)/);
|
|
596
596
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
} catch {}
|
|
597
|
+
// if (sizeMatch && freeMatch) {
|
|
598
|
+
// const size = parseInt(sizeMatch[1]);
|
|
599
|
+
// const free = parseInt(freeMatch[1]);
|
|
600
|
+
// const used = size - free;
|
|
601
|
+
// const percentUsed = Math.round((used / size) * 100);
|
|
602
|
+
// const color = colors[settings.colors.disk_used] || colors.purple;
|
|
603
|
+
// const emoji = settings.display.show_emojis ? '📁 ' : '';
|
|
604
|
+
// const result = `${color}${emoji}${percentUsed}%`;
|
|
605
|
+
// setCachedValue(this.cache, 'disk_used', result);
|
|
606
|
+
// return result;
|
|
607
|
+
// }
|
|
608
|
+
// } catch {}
|
|
609
609
|
} else if (IS_LINUX) {
|
|
610
610
|
try {
|
|
611
611
|
const df = execCommand('df -h');
|
|
@@ -825,7 +825,7 @@ const infoFunctions = {
|
|
|
825
825
|
const cached = getCachedValue(this.cache, 'pacman', settings);
|
|
826
826
|
if (cached) return cached;
|
|
827
827
|
|
|
828
|
-
const commands = ['apt', 'npm', '
|
|
828
|
+
const commands = ['apt', 'npm', 'uv', 'docker', 'hx', 'nvim', 'bun', 'yay',
|
|
829
829
|
'pacman', 'yum', 'dnf', 'zypper', 'emerge', 'apk', 'snap', 'flatpak'];
|
|
830
830
|
const available = commands.filter(cmd => commandExists(cmd));
|
|
831
831
|
|