mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
SettingsWindow: allow tilde usage
This commit is contained in:
@@ -375,6 +375,23 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
// Function to preprocess paths by expanding "~" to user's home directory
|
||||
function preprocessPath(path) {
|
||||
if (typeof path !== "string" || path === "") {
|
||||
return path
|
||||
}
|
||||
|
||||
// Expand "~" to user's home directory
|
||||
if (path.startsWith("~/")) {
|
||||
return Quickshell.env("HOME") + path.substring(1)
|
||||
} else if (path === "~") {
|
||||
return Quickshell.env("HOME")
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
// Public function to trigger immediate settings saving
|
||||
function saveImmediate() {
|
||||
|
||||
Reference in New Issue
Block a user