1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -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"

View File

@@ -362,10 +362,7 @@ Singleton {
if (!image) {
return ""
}
if (image.startsWith("file://")) {
return image.substring(7)
}
return image
return Paths.strip(image)
}
readonly property int urgency: notification.urgency
readonly property list<NotificationAction> actions: notification.actions