Skip to content

Commit

Permalink
Sensors v4.0.1: As long as the icon is hovered over, the sensors are …
Browse files Browse the repository at this point in the history
…checked every second
  • Loading branch information
claudiux committed Jan 14, 2025
1 parent c1a601b commit 65c8dbd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Sensors@claudiux/files/Sensors@claudiux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
### v4.0.1~20250114
* As long as the icon is hovered over, the sensors are checked every second.

### v4.0.0~20250114
* Now uses mainloopTools to improve loop management.
* Maybe fixes #6744.
* Fixes #6744.

### v3.9.0~20241109
* Fixes #6076: Ignores 'empty' sensors (sensors not sending data).
Expand Down
24 changes: 20 additions & 4 deletions Sensors@claudiux/files/Sensors@claudiux/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1723,15 +1723,31 @@ class SensorsApplet extends Applet.TextApplet {
* Events
*/
on_enter_event(actor, event) {
this.tooltip_must_be_updated = true;
this.updateUI();
this.isUpdatingUI = true;
this.updateTooltip();
this.isActorEntered = true;
this.onEnterEventInterval = setInterval( () => {
this.tooltip_must_be_updated = true;
this.reap_sensors();
this.isUpdatingUI = false; //new
this.updateUI();
this.isUpdatingUI = true;
this.updateTooltip();
return this.isActorEntered;
},
1000
);
}

on_leave_event(actor, event) {
this.isActorEntered = false;
if (this.onEnterEventInterval != null) {
clearInterval(this.onEnterEventInterval);
this.onEnterEventInterval = false;
}
this.tooltip_must_be_updated = false;
this.isUpdatingUI = false;
this.isActorEntered = false;
remove_all_sources();
this.loopId = timeout_add_seconds(this.interval, () => { this.reap_sensors(); });
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Sensors@claudiux/files/Sensors@claudiux/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"uuid": "Sensors@claudiux",
"name": "Sensors Monitor",
"description": "Displays the values of many computer sensors concerning Temperatures (CPU - GPU - Power Supply), Fan Speed, Voltages, Intrusions. Notifies you with color changes when a value reaches or exceeds its limit.",
"version": "4.0.0",
"version": "4.0.1",
"max-instances": 1,
"cinnamon-version": [
"3.8",
Expand Down

0 comments on commit 65c8dbd

Please sign in to comment.