From f419f4167ad6b8ace21e2dbfe644a90fa203f486 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Mon, 28 Apr 2025 15:25:52 -0300 Subject: [PATCH] :boom: ags(scripts/nightlight): do not call hyprsunset when changing variables --- ags/scripts/nightlight.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ags/scripts/nightlight.ts b/ags/scripts/nightlight.ts index 64c2484..419ee0a 100644 --- a/ags/scripts/nightlight.ts +++ b/ags/scripts/nightlight.ts @@ -42,8 +42,10 @@ class NightLight extends GObject.Object { if(t.trim() !== "" && t.trim().length <= 5) { const val = Number.parseInt(t.trim()); - if(this.#temperature !== val) - this.temperature = val; + if(this.#temperature !== val) { + this.#temperature = val; + this.notify("temperature"); + } } }).catch((r) => console.error(r)); @@ -51,8 +53,10 @@ class NightLight extends GObject.Object { if(g.trim() !== "" && g.trim().length <= 5) { const val = Number.parseInt(g.trim()); - if(this.#gamma !== val) - this.gamma = val; + if(this.#gamma !== val) { + this.#gamma = val; + this.notify("gamma"); + } } }).catch((r) => console.error(r)); });