import QtQuick
import org.kde.plasma.plasmoid
import "schedule.js" as Schedule
WallpaperItem {
id: root
readonly property var cfg: root.configuration
property var scheme: Schedule.palette(cfg, new Date())
function refresh() {
scheme = Schedule.palette(cfg, new Date())
}
// The sun moves slowly enough that once a minute is smooth, and the
// Field eases between the steps.
Timer {
running: root.cfg.ThemeMode === "sun"
interval: 60000
repeat: true
onTriggered: root.refresh()
}
Connections {
target: root.cfg
function onValueChanged() { root.refresh() }
}
Field {
anchors.fill: parent
pattern: root.cfg.Pattern
speed: root.cfg.Speed
frameRate: root.cfg.FrameRate
base: root.scheme.base
deep: root.scheme.deep
ink: root.scheme.ink
tone: root.scheme.tone
// Lets Plasma re-derive its accent colour when the palette moves.
onBaseChanged: root.accentColorChanged()
}
}
neiam
/neiam-devices
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
1.0 KiB · text
History
f629a67