lock screen?
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Services.Mpris
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property list<MprisPlayer> list: Mpris.players.values
|
||||
}
|
||||
@@ -19,6 +19,7 @@ Searcher {
|
||||
function setWallpaper(path: string): void {
|
||||
actualCurrent = path;
|
||||
WallpaperPath.currentWallpaperPath = path;
|
||||
Quickshell.execDetached(["python3", Quickshell.shellPath("scripts/LockScreenBg.py"), `--input_image=${root.actualCurrent}`, `--output_path=${Paths.state}/lockscreen_bg.png`]);
|
||||
}
|
||||
|
||||
function preview(path: string): void {
|
||||
|
||||
@@ -2,11 +2,13 @@ pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Paths
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property alias currentWallpaperPath: adapter.currentWallpaperPath
|
||||
property alias lockscreenBg: adapter.lockscreenBg
|
||||
|
||||
FileView {
|
||||
id: fileView
|
||||
@@ -18,6 +20,7 @@ Singleton {
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
property string currentWallpaperPath: ""
|
||||
property string lockscreenBg: `${Paths.state}/lockscreen_bg.png`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user