mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
fix Hyprsunset default color temperature (#3254)
This commit is contained in:
@@ -21,6 +21,7 @@ Singleton {
|
|||||||
property string to: Config.options?.light?.night?.to ?? "06:30"
|
property string to: Config.options?.light?.night?.to ?? "06:30"
|
||||||
property bool automatic: Config.options?.light?.night?.automatic && (Config?.ready ?? true)
|
property bool automatic: Config.options?.light?.night?.automatic && (Config?.ready ?? true)
|
||||||
property int colorTemperature: Config.options?.light?.night?.colorTemperature ?? 5000
|
property int colorTemperature: Config.options?.light?.night?.colorTemperature ?? 5000
|
||||||
|
property int defaultColorTemperature: 6000
|
||||||
property int gamma: 100
|
property int gamma: 100
|
||||||
property bool shouldBeOn
|
property bool shouldBeOn
|
||||||
property bool firstEvaluation: true
|
property bool firstEvaluation: true
|
||||||
@@ -112,7 +113,7 @@ Singleton {
|
|||||||
function disableTemperature() {
|
function disableTemperature() {
|
||||||
root.temperatureActive = false;
|
root.temperatureActive = false;
|
||||||
// console.log("[Hyprsunset] Disabling");
|
// console.log("[Hyprsunset] Disabling");
|
||||||
Quickshell.execDetached(["hyprctl", "hyprsunset", "identity"]);
|
Quickshell.execDetached(["bash", "-c", `hyprctl hyprsunset temperature ${root.defaultColorTemperature}`]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setGamma(gamma) {
|
function setGamma(gamma) {
|
||||||
@@ -139,7 +140,7 @@ Singleton {
|
|||||||
if (output.length == 0 || output.startsWith("Couldn't"))
|
if (output.length == 0 || output.startsWith("Couldn't"))
|
||||||
root.temperatureActive = false;
|
root.temperatureActive = false;
|
||||||
else
|
else
|
||||||
root.temperatureActive = (output != "6500"); // 6500 is the default when off
|
root.temperatureActive = (output != root.defaultColorTemperature); // 6000 is the default when off
|
||||||
// console.log("[Hyprsunset] Fetched state:", output, "->", root.temperatureActive);
|
// console.log("[Hyprsunset] Fetched state:", output, "->", root.temperatureActive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user