From 0b916325ba4d4b941b13488247881f1ed4739c05 Mon Sep 17 00:00:00 2001
From: Chris Monahan <3803591+corecoding@users.noreply.github.com>
Date: Mon, 19 Feb 2024 14:09:55 -0500
Subject: [PATCH 1/3] Fixes per review
---
helpers/subprocess.js | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/helpers/subprocess.js b/helpers/subprocess.js
index 1a20150..93558da 100644
--- a/helpers/subprocess.js
+++ b/helpers/subprocess.js
@@ -1,22 +1,11 @@
import GLib from 'gi://GLib';
import Gio from 'gi://Gio';
-const ByteArray = imports.byteArray;
-
-var Decoder;
-try {
- Decoder = new TextDecoder('utf-8');
-} catch(error) {}
// convert Uint8Array into a literal string
function convertUint8ArrayToString(contents) {
// Starting with Gnome 41, we use TextDecoder as ByteArray is deprecated
- if (Decoder)
- return Decoder.decode(contents).trim();
-
- // Supports ByteArray on Gnome 40
- // fixes #304, replaces invalid character
- contents[contents.indexOf(208)] = 0;
- return ByteArray.toString(contents).trim();
+ var Decoder = new TextDecoder('utf-8');
+ return Decoder.decode(contents).trim();
}
export function SubProcess(command) {
@@ -63,4 +52,4 @@ SubProcess.prototype.terminate = function() {
this.sub_process = null;
this.stdout.close_async(GLib.PRIORITY_LOW, null, null);
this.stdout = null;
-};
\ No newline at end of file
+};
From 64d7dd37036cf1e0520c90ef395bc59e738d46f3 Mon Sep 17 00:00:00 2001
From: Chris Monahan <3803591+corecoding@users.noreply.github.com>
Date: Mon, 19 Feb 2024 14:14:30 -0500
Subject: [PATCH 2/3] reorder newly added settings
---
....gnome.shell.extensions.vitals.gschema.xml | 30 +++++++++----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/schemas/org.gnome.shell.extensions.vitals.gschema.xml b/schemas/org.gnome.shell.extensions.vitals.gschema.xml
index 484924e..3931085 100644
--- a/schemas/org.gnome.shell.extensions.vitals.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.vitals.gschema.xml
@@ -61,11 +61,6 @@
Monitor processor
Display processor information
-
- false
- Include processor static information
- Display processor static information that doesn't change
-
true
Monitor system
@@ -116,16 +111,6 @@
Battery slot to monitor
Which numerical battery slot should vitals monitor
-
- false
- Monitor GPU
- Display GPU information (requires the nvidia-smi tool)
-
-
- false
- Include GPU static information
- Display GPU static information that doesn't change
-
true
Use fixed widths in top bar
@@ -146,5 +131,20 @@
System Monitor command
The command run when system monitor button is clicked
+
+ false
+ Include processor static information
+ Display processor static information that doesn't change
+
+
+ false
+ Monitor GPU
+ Display GPU information (requires the nvidia-smi tool)
+
+
+ false
+ Include GPU static information
+ Display GPU static information that doesn't change
+
From 24c8efdb4b62e77948f1f43fd0c312462f8e8e6e Mon Sep 17 00:00:00 2001
From: Chris Monahan <3803591+corecoding@users.noreply.github.com>
Date: Mon, 19 Feb 2024 15:38:45 -0500
Subject: [PATCH 3/3] Update subprocess.js
---
helpers/subprocess.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/helpers/subprocess.js b/helpers/subprocess.js
index 93558da..df0bf49 100644
--- a/helpers/subprocess.js
+++ b/helpers/subprocess.js
@@ -3,9 +3,8 @@ import Gio from 'gi://Gio';
// convert Uint8Array into a literal string
function convertUint8ArrayToString(contents) {
- // Starting with Gnome 41, we use TextDecoder as ByteArray is deprecated
- var Decoder = new TextDecoder('utf-8');
- return Decoder.decode(contents).trim();
+ const decoder = new TextDecoder('utf-8');
+ return decoder.decode(contents).trim();
}
export function SubProcess(command) {