1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -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

@@ -1,20 +1,16 @@
pragma Singleton
pragma ComponentBehavior: Bound
import QtQuick
import QtCore
import Quickshell
import Quickshell.Io
pragma Singleton
pragma ComponentBehavior: Bound
import qs.Common
Singleton {
id: root
readonly property string baseDir: {
var path = StandardPaths.writableLocation(StandardPaths.GenericStateLocation) + "/DankMaterialShell"
if (path.startsWith("file://")) {
return path.substring(7)
}
return path
}
readonly property string baseDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericStateLocation) + "/DankMaterialShell")
readonly property string filesDir: baseDir + "/notepad-files"
readonly property string metadataPath: baseDir + "/notepad-session.json"