summaryrefslogtreecommitdiff
path: root/src/services/gpu.ts
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-22 20:35:20 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-22 20:35:20 +1100
commit2d979684453659318daf794febafb0887a12fb50 (patch)
tree2fd8131c34bc59e50d001938fe29021732e520c8 /src/services/gpu.ts
parentnotifpopups: close all popups when notifs open (diff)
downloadcaelestia-shell-2d979684453659318daf794febafb0887a12fb50.tar.gz
caelestia-shell-2d979684453659318daf794febafb0887a12fb50.tar.bz2
caelestia-shell-2d979684453659318daf794febafb0887a12fb50.zip
config: dynamic service confs
Diffstat (limited to 'src/services/gpu.ts')
-rw-r--r--src/services/gpu.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/services/gpu.ts b/src/services/gpu.ts
index 179f14e..5ac2d8d 100644
--- a/src/services/gpu.ts
+++ b/src/services/gpu.ts
@@ -52,6 +52,12 @@ export default class Gpu extends GObject.Object {
}
}
- if (this.available) interval(config.interval, () => this.update());
+ if (this.available) {
+ let source = interval(config.interval.get(), () => this.update());
+ config.interval.subscribe(i => {
+ source.cancel();
+ source = interval(i, () => this.update());
+ });
+ }
}
}