Files
z-bar-qt/Helpers/Hyprsunset.qml
T
zach d246ba1800
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 13s
Python / lint-format (pull_request) Successful in 19s
Python / test (pull_request) Successful in 50s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m2s
rewrite the manager responsible for handling automatic hyprsunset temperature activation as a qml plugin
2026-06-02 16:09:48 +02:00

38 lines
776 B
QML

pragma Singleton
import Quickshell
import QtQuick
import ZShell.Services
import qs.Config
Singleton {
id: root
readonly property bool enabled: service.enabled
readonly property int end: Config.general.color.scheduleHyprsunsetEnd
property bool manualToggle: false
readonly property int start: Config.general.color.scheduleHyprsunsetStart
readonly property int temp: Config.general.color.hyprsunsetTemp
function checkStartup(): void {
if (!Config.general.color.scheduleHyprsunset)
return;
service.apply();
}
function toggleNightLight(): void {
service.manualToggle = true;
service.toggle();
}
HyprsunsetManager {
id: service
activeAuto: Config.general.color.scheduleHyprsunset
endTime: root.end
startTime: root.start
temp: root.temp
}
}