aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules')
-rw-r--r--desktop/modules/appearance/WallEngine.qml14
-rw-r--r--desktop/modules/appearance/WallpaperTab.qml9
-rw-r--r--desktop/modules/appearance/Wallpapers.qml3
3 files changed, 25 insertions, 1 deletions
diff --git a/desktop/modules/appearance/WallEngine.qml b/desktop/modules/appearance/WallEngine.qml
index 54705f6..f8d96ac 100644
--- a/desktop/modules/appearance/WallEngine.qml
+++ b/desktop/modules/appearance/WallEngine.qml
@@ -135,6 +135,20 @@ Singleton {
nextAt = Date.now() + timer.interval;
}
+ // The pair up now differs from home only when a tick put it there, with
+ // the light run.
+ readonly property bool keepable: on
+ && (cfg.homeH !== Wallpapers.currentH || cfg.homeV !== Wallpapers.currentV)
+ // Liked what a tick put up: a full run of the same pair brings GRUB, the
+ // homepage and SDDM along, and it becomes home, so switching off does not
+ // undo that, and stays up a full interval like a pick by hand.
+ function keep() {
+ const h = Wallpapers.currentH, v = Wallpapers.currentV;
+ if (!keepable || !Wallpapers.run(h, v, "keep")) return;
+ Prefs.setWallEngine({ homeH: h, homeV: v });
+ restartTimer();
+ }
+
// A switch-off during a run cannot start its own; it goes when that run
// finishes.
property bool homeWaiting: false
diff --git a/desktop/modules/appearance/WallpaperTab.qml b/desktop/modules/appearance/WallpaperTab.qml
index 134c90e..136b24d 100644
--- a/desktop/modules/appearance/WallpaperTab.qml
+++ b/desktop/modules/appearance/WallpaperTab.qml
@@ -178,6 +178,15 @@ Column {
onClicked: decided ? Wallpapers.upscaleFile(actions.staged) : Wallpapers.decide(actions.staged)
}
+ // The engine's ticks are light runs; this makes the pair up
+ // now a full one and the engine's home (WallEngine.keep).
+ Tab {
+ visible: WallEngine.keepable
+ enabled: !Wallpapers.applying
+ text: "Keep this pair"
+ onClicked: WallEngine.keep()
+ }
+
// Apply and Reset are in the page header, with every settings
// page's.
// wallhaven-dl searches wallhaven.cc and finds larger
diff --git a/desktop/modules/appearance/Wallpapers.qml b/desktop/modules/appearance/Wallpapers.qml
index 73c1f25..582fb22 100644
--- a/desktop/modules/appearance/Wallpapers.qml
+++ b/desktop/modules/appearance/Wallpapers.qml
@@ -322,7 +322,8 @@ Singleton {
}
// What started the run in flight: "manual" (Apply), "tick" (the engine's
- // timer) or "home" (the engine switched off). A tick is the light run,
+ // timer), "home" (the engine switched off) or "keep" (the pair up now,
+ // run in full). A tick is the light run,
// UDT_ROTATION, which udt-accent reads; the others are full.
property string kind: ""