1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 14:32:52 -05:00

use Paths.strip helper everywhere for consistency sake

This commit is contained in:
bbedward
2025-09-17 11:08:51 -04:00
parent 344761df00
commit 02300024cf
7 changed files with 19 additions and 33 deletions

View File

@@ -87,7 +87,7 @@ Item {
var currentWallpaper = SessionData.getMonitorWallpaper(screenName)
if (screenName && currentWallpaper && currentWallpaper.startsWith("we:")) {
const cacheHome = StandardPaths.writableLocation(StandardPaths.CacheLocation).toString()
const baseDir = cacheHome.startsWith("file://") ? cacheHome.substring(7) : cacheHome
const baseDir = Paths.strip(cacheHome)
const screenshotPath = baseDir + "/dankshell/we_screenshots" + "/" + currentWallpaper.substring(3) + ".jpg"
return screenshotPath
}

View File

@@ -2,6 +2,7 @@ import QtCore
import QtQuick
import Quickshell.Io
import Quickshell
import qs.Common
Item {
id: root
@@ -22,7 +23,7 @@ Item {
onExited: (code) => {
if (pendingSceneId !== "") {
const cacheHome = StandardPaths.writableLocation(StandardPaths.CacheLocation).toString()
const baseDir = cacheHome.startsWith("file://") ? cacheHome.substring(7) : cacheHome
const baseDir = Paths.strip(cacheHome)
const outDir = baseDir + "/dankshell/we_screenshots"
const outPath = outDir + "/" + pendingSceneId + ".jpg"