Fix hyprsunset config not applying on launch

This commit is contained in:
altrup
2026-03-23 22:15:25 -04:00
parent deadf6cc4f
commit 78c6e3c16f
@@ -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}`]);
}