1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

re-add --screenshot

This commit is contained in:
bbedward
2025-09-12 14:08:32 -04:00
parent 27344a47e2
commit 9e1272029e

View File

@@ -21,9 +21,17 @@ Item {
command: []
onExited: (code) => {
if (pendingSceneId !== "") {
const cacheHome = StandardPaths.writableLocation(StandardPaths.CacheLocation).toString()
const baseDir = cacheHome.startsWith("file://") ? cacheHome.substring(7) : cacheHome
const outDir = baseDir + "/dankshell/we_screenshots"
const outPath = outDir + "/" + pendingSceneId + ".jpg"
console.log("SCREENSHOT PATH", outPath)
Quickshell.execDetached(["mkdir", "-p", outDir])
weProcess.command = [
"linux-wallpaperengine",
"--screen-root", monitor,
"--screenshot", outPath,
"--bg", pendingSceneId,
"--silent"
]