C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 6s
C++ / clang-tidy (pull_request) Failing after 21s
JS/TS / lint (pull_request) Successful in 10s
Python / static (pull_request) Successful in 26s
Rust / build (pull_request) Successful in 47s
Rust / fmt (pull_request) Successful in 28s
Python / verify (pull_request) Successful in 1m39s
Rust / clippy (pull_request) Successful in 46s
40 lines
876 B
QML
40 lines
876 B
QML
pragma Singleton
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
import ZShell.Services
|
|
import ZShell.Config
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
readonly property bool enabled: service.enabled
|
|
readonly property int end: Config.display.nightlight.scheduleEnd
|
|
property bool manualToggle: false
|
|
readonly property int start: Config.display.nightlight.scheduleStart
|
|
readonly property int temp: Config.display.nightlight.temp
|
|
|
|
function checkStartup(): void {
|
|
if (!Config.display.nightlight.schedule)
|
|
return;
|
|
|
|
service.apply();
|
|
}
|
|
|
|
function toggleNightLight(): void {
|
|
service.manualToggle = true;
|
|
service.toggle();
|
|
}
|
|
|
|
NightlightManager {
|
|
id: service
|
|
|
|
activeAuto: Config.display.nightlight.schedule
|
|
endTime: root.end
|
|
startTime: root.start
|
|
temp: root.temp
|
|
fadeDuration: Config.display.nightlight.fadeDuration / 1000
|
|
useNativeNightlight: Config.display.nightlight.useNative
|
|
}
|
|
}
|