diff --git a/contents/config/main.xml b/contents/config/main.xml
index a45d5a0..5fa6d4d 100644
--- a/contents/config/main.xml
+++ b/contents/config/main.xml
@@ -69,6 +69,10 @@
false
+
+
+ false
+
diff --git a/contents/ui/config.qml b/contents/ui/config.qml
index a565a51..04ecc20 100644
--- a/contents/ui/config.qml
+++ b/contents/ui/config.qml
@@ -50,6 +50,8 @@ ColumnLayout {
property string cfg_SearchColor
+ property bool cfg_RandomSeed
+
Image {
id: currentWallpaper
source: wallpaper.configuration.currentWallpaperThumbnail
@@ -288,6 +290,17 @@ ColumnLayout {
}
}
}
+
+ RowLayout {
+ Kirigami.FormData.label: i18n("Random seed")
+ CheckBox {
+ text: i18n("Enable")
+ checked: cfg_RandomSeed
+ onToggled: {
+ cfg_RandomSeed = checked;
+ }
+ }
+ }
}
Label {
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index f1e9de2..6fa386d 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -144,6 +144,10 @@ QQC2.StackView {
url += `ratios=${encodeURIComponent(root.aspectRatio)}&`
+ if (wallpaper.configuration.RandomSeed) {
+ url += `seed=${generateSeed()}`
+ }
+
url += `q=${encodeURIComponent(wallpaper.configuration.Query)}`
console.error('using url: ' + url);
@@ -239,6 +243,18 @@ QQC2.StackView {
pendingImage = null;
}
+ function generateSeed() {
+ const characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ const generatedCharacters = [];
+
+ for (let i = 0; i < 6; i++) {
+ const randomIndex = Math.floor(Math.random() * characters.length);
+ generatedCharacters.push(characters.charAt(randomIndex));
+ }
+
+ return generatedCharacters.join('');
+ }
+
replaceEnter: Transition {
OpacityAnimator {
id: replaceEnterOpacityAnimator