wallust integration
This commit is contained in:
@@ -10,6 +10,7 @@ Singleton {
|
|||||||
property alias accentColor: adapter.accentColor
|
property alias accentColor: adapter.accentColor
|
||||||
property alias wallpaperPath: adapter.wallpaperPath
|
property alias wallpaperPath: adapter.wallpaperPath
|
||||||
property alias maxWallpapers: adapter.maxWallpapers
|
property alias maxWallpapers: adapter.maxWallpapers
|
||||||
|
property alias wallust: adapter.wallust
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: root
|
id: root
|
||||||
@@ -29,6 +30,7 @@ Singleton {
|
|||||||
property string baseBgColor: "#801a1a1a"
|
property string baseBgColor: "#801a1a1a"
|
||||||
property AccentColor accentColor: AccentColor {}
|
property AccentColor accentColor: AccentColor {}
|
||||||
property int maxWallpapers: 7
|
property int maxWallpapers: 7
|
||||||
|
property bool wallust: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import Quickshell
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
|
import qs.Config
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: root
|
id: root
|
||||||
@@ -83,6 +84,9 @@ TextField {
|
|||||||
launcherWindow.visible = false;
|
launcherWindow.visible = false;
|
||||||
} else if ( wallpaperPickerLoader.active ) {
|
} else if ( wallpaperPickerLoader.active ) {
|
||||||
WallpaperPath.currentWallpaperPath = wallpaperPickerLoader.item.currentItem.modelData.path;
|
WallpaperPath.currentWallpaperPath = wallpaperPickerLoader.item.currentItem.modelData.path;
|
||||||
|
if ( Config.wallust ) {
|
||||||
|
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
} else if ( event.key === Qt.Key_Escape ) {
|
} else if ( event.key === Qt.Key_Escape ) {
|
||||||
|
|||||||
@@ -259,9 +259,8 @@ Scope {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Screen width - 4x outer rounding - 2x max side thickness (cause centered)
|
// Screen width - 4x outer rounding - 2x max side thickness (cause centered)
|
||||||
const barMargins = 10;
|
const margins = 10;
|
||||||
let outerMargins = 0;
|
const maxWidth = screen.width - margins * 2;
|
||||||
const maxWidth = screen.width - (barMargins + outerMargins) * 2;
|
|
||||||
|
|
||||||
if ( maxWidth <= 0 )
|
if ( maxWidth <= 0 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Singleton {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property var args
|
||||||
|
|
||||||
|
function generateColors(wallpaperPath) {
|
||||||
|
root.args = wallpaperPath;
|
||||||
|
wallustProc.running = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: wallustProc
|
||||||
|
command: ["wallust", "run", root.args, "--palette=dark16", "--ignore-sequence=cursor", "--threshold=9" ]
|
||||||
|
running: false
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ import Quickshell
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
|
import qs.Modules
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
Variants {
|
Variants {
|
||||||
@@ -24,6 +25,13 @@ Scope {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: WallpaperPath.currentWallpaperPath
|
source: WallpaperPath.currentWallpaperPath
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
|
||||||
|
// Behavior on source {
|
||||||
|
// Anim {
|
||||||
|
// properties: "opacity"
|
||||||
|
// duration: 500
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user