diff --git a/icons/gnome/battery-symbolic.svg b/icons/gnome/battery-symbolic.svg
index 70df9ee..28a9887 100644
--- a/icons/gnome/battery-symbolic.svg
+++ b/icons/gnome/battery-symbolic.svg
@@ -1,8 +1 @@
-
-
+
\ No newline at end of file
diff --git a/icons/gnome/cpu-symbolic.svg b/icons/gnome/cpu-symbolic.svg
index 86ca8bf..31c397b 100644
--- a/icons/gnome/cpu-symbolic.svg
+++ b/icons/gnome/cpu-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/fan-symbolic.svg b/icons/gnome/fan-symbolic.svg
index ea2b44f..234f797 100644
--- a/icons/gnome/fan-symbolic.svg
+++ b/icons/gnome/fan-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/gpu-symbolic.svg b/icons/gnome/gpu-symbolic.svg
index d5cf157..b59beda 100644
--- a/icons/gnome/gpu-symbolic.svg
+++ b/icons/gnome/gpu-symbolic.svg
@@ -1,15 +1 @@
-
-
-
+
\ No newline at end of file
diff --git a/icons/gnome/memory-symbolic.svg b/icons/gnome/memory-symbolic.svg
index 1946901..7fb2200 100644
--- a/icons/gnome/memory-symbolic.svg
+++ b/icons/gnome/memory-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/network-download-symbolic.svg b/icons/gnome/network-download-symbolic.svg
index 4fc170b..7ec91a8 100644
--- a/icons/gnome/network-download-symbolic.svg
+++ b/icons/gnome/network-download-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/network-symbolic.svg b/icons/gnome/network-symbolic.svg
index 2ff9778..125ba60 100644
--- a/icons/gnome/network-symbolic.svg
+++ b/icons/gnome/network-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/network-upload-symbolic.svg b/icons/gnome/network-upload-symbolic.svg
index 0d67f65..bd31f33 100644
--- a/icons/gnome/network-upload-symbolic.svg
+++ b/icons/gnome/network-upload-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/storage-symbolic.svg b/icons/gnome/storage-symbolic.svg
index 30d9007..b0d4753 100644
--- a/icons/gnome/storage-symbolic.svg
+++ b/icons/gnome/storage-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/system-symbolic.svg b/icons/gnome/system-symbolic.svg
index bfbf1bd..a041518 100644
--- a/icons/gnome/system-symbolic.svg
+++ b/icons/gnome/system-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/temperature-symbolic.svg b/icons/gnome/temperature-symbolic.svg
index e00a2eb..ed976bf 100644
--- a/icons/gnome/temperature-symbolic.svg
+++ b/icons/gnome/temperature-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/gnome/voltage-symbolic.svg b/icons/gnome/voltage-symbolic.svg
index 1aa2210..c786442 100644
--- a/icons/gnome/voltage-symbolic.svg
+++ b/icons/gnome/voltage-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/prefs.ui b/prefs.ui
index ab07185..537decf 100644
--- a/prefs.ui
+++ b/prefs.ui
@@ -1222,6 +1222,7 @@
BAT0BAT1BAT2
+ BATTCMB0macsmc-battery
diff --git a/sensors.js b/sensors.js
index 2ba8c2e..10f93c7 100644
--- a/sensors.js
+++ b/sensors.js
@@ -140,6 +140,8 @@ export const Sensors = GObject.registerClass({
let used = total - avail
let utilized = used / total;
+ let swapUsed = swapTotal - swapFree
+ let swapUtilized = swapUsed / swapTotal;
this._returnValue(callback, 'Usage', utilized, 'memory', 'percent');
this._returnValue(callback, 'memory', utilized, 'memory-group', 'percent');
@@ -148,7 +150,10 @@ export const Sensors = GObject.registerClass({
this._returnValue(callback, 'Allocated', used, 'memory', 'memory');
this._returnValue(callback, 'Cached', cached, 'memory', 'memory');
this._returnValue(callback, 'Free', memFree, 'memory', 'memory');
- this._returnValue(callback, 'Swap', swapTotal - swapFree, 'memory', 'memory');
+ this._returnValue(callback, 'Swap Total', swapTotal, 'memory', 'memory');
+ this._returnValue(callback, 'Swap Free', swapFree, 'memory', 'memory');
+ this._returnValue(callback, 'Swap Used', swapUsed, 'memory', 'memory');
+ this._returnValue(callback, 'Swap Usage', swapUtilized, 'memory', 'percent');
}).catch(err => { });
}
@@ -373,9 +378,11 @@ export const Sensors = GObject.registerClass({
// addresses issue #161
let battery_key = 'BAT'; // BAT0, BAT1 and BAT2
if (battery_slot == 3) {
+ battery_slot = 'T';
+ } else if (battery_slot == 4) {
battery_key = 'CMB'; // CMB0
battery_slot = 0;
- } else if (battery_slot == 4) {
+ } else if (battery_slot == 5) {
battery_key = 'macsmc-battery'; // supports Asahi linux
battery_slot = '';
}