From 78c6e3c16f88f9bb77d25313f0174850a2aac15e Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:15:25 -0400 Subject: [PATCH] Fix hyprsunset config not applying on launch --- .../quickshell/ii/services/Hyprsunset.qml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/services/Hyprsunset.qml b/dots/.config/quickshell/ii/services/Hyprsunset.qml index 5749ee251..c9fac1a6d 100644 --- a/dots/.config/quickshell/ii/services/Hyprsunset.qml +++ b/dots/.config/quickshell/ii/services/Hyprsunset.qml @@ -80,14 +80,30 @@ Singleton { } } - function load() { + function startHyprsunset() { Quickshell.execDetached(["bash", "-c", `pidof hyprsunset || hyprsunset`]); } + function load() { + root.startHyprsunset(); + updateHyprsunset.restart(); + } + + Timer { + id: updateHyprsunset + interval: 100 + repeat: false + onTriggered: { + root.ensureState(); + root.setGamma(root.gamma); + } + } + function enableTemperature() { root.temperatureActive = true; + // console.log("[Hyprsunset] Enabling"); - root.load(); + root.startHyprsunset(); Quickshell.execDetached(["bash", "-c", `hyprctl hyprsunset temperature ${root.colorTemperature}`]); } @@ -102,7 +118,7 @@ Singleton { root.gammaChangeAttempt(); - root.load(); + root.startHyprsunset(); Quickshell.execDetached(["bash", "-c", `hyprctl hyprsunset gamma ${root.gamma}`]); }