config: allow resolving paths from home
This commit is contained in:
parent
c9f1d4138f
commit
8915808414
4 changed files with 7 additions and 8 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue