config: allow resolving paths from home

This commit is contained in:
2 * r + 2 * t 2025-06-28 19:05:42 +10:00
parent c9f1d4138f
commit 8915808414
4 changed files with 7 additions and 8 deletions

View file

@ -525,7 +525,7 @@ Item {
playing: root.shouldUpdate && (Players.active?.isPlaying ?? false)
speed: BeatDetector.bpm / 300
source: Config.paths.mediaGif
source: Paths.expandTilde(Config.paths.mediaGif)
asynchronous: true
fillMode: AnimatedImage.PreserveAspectFit
}

View file

@ -1,9 +1,7 @@
import "root:/widgets"
import "root:/services"
import "root:/config"
import Quickshell
import Quickshell.Io
import Quickshell.Widgets
import "root:/utils"
import QtQuick
import QtQuick.Shapes
@ -223,7 +221,7 @@ Item {
playing: root.shouldUpdate && (Players.active?.isPlaying ?? false)
speed: BeatDetector.bpm / 300
source: Config.paths.mediaGif
source: Paths.expandTilde(Config.paths.mediaGif)
asynchronous: true
fillMode: AnimatedImage.PreserveAspectFit
}

View file

@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import "root:/widgets"
import "root:/services"
import "root:/config"
import "root:/utils"
import Quickshell
import QtQuick
@ -60,7 +61,7 @@ Column {
playing: visible
asynchronous: true
speed: 0.7
source: Config.paths.sessionGif
source: Paths.expandTilde(Config.paths.sessionGif)
}
SessionButton {

View file

@ -97,7 +97,7 @@ Singleton {
id: getWallsProc
running: true
command: ["find", Config.paths.wallpaperDir, "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"]
command: ["find", Paths.expandTilde(Config.paths.wallpaperDir), "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"]
stdout: StdioCollector {
onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort()
}
@ -107,7 +107,7 @@ Singleton {
id: watchWallsProc
running: true
command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Config.paths.wallpaperDir]
command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Paths.expandTilde(Config.paths.wallpaperDir)]
stdout: SplitParser {
onRead: data => {
if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))