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)
|
playing: root.shouldUpdate && (Players.active?.isPlaying ?? false)
|
||||||
speed: BeatDetector.bpm / 300
|
speed: BeatDetector.bpm / 300
|
||||||
source: Config.paths.mediaGif
|
source: Paths.expandTilde(Config.paths.mediaGif)
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: AnimatedImage.PreserveAspectFit
|
fillMode: AnimatedImage.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
import "root:/widgets"
|
import "root:/widgets"
|
||||||
import "root:/services"
|
import "root:/services"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import Quickshell
|
import "root:/utils"
|
||||||
import Quickshell.Io
|
|
||||||
import Quickshell.Widgets
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Shapes
|
import QtQuick.Shapes
|
||||||
|
|
||||||
|
|
@ -223,7 +221,7 @@ Item {
|
||||||
|
|
||||||
playing: root.shouldUpdate && (Players.active?.isPlaying ?? false)
|
playing: root.shouldUpdate && (Players.active?.isPlaying ?? false)
|
||||||
speed: BeatDetector.bpm / 300
|
speed: BeatDetector.bpm / 300
|
||||||
source: Config.paths.mediaGif
|
source: Paths.expandTilde(Config.paths.mediaGif)
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: AnimatedImage.PreserveAspectFit
|
fillMode: AnimatedImage.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
||||||
import "root:/widgets"
|
import "root:/widgets"
|
||||||
import "root:/services"
|
import "root:/services"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
|
import "root:/utils"
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
|
|
@ -60,7 +61,7 @@ Column {
|
||||||
playing: visible
|
playing: visible
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
speed: 0.7
|
speed: 0.7
|
||||||
source: Config.paths.sessionGif
|
source: Paths.expandTilde(Config.paths.sessionGif)
|
||||||
}
|
}
|
||||||
|
|
||||||
SessionButton {
|
SessionButton {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ Singleton {
|
||||||
id: getWallsProc
|
id: getWallsProc
|
||||||
|
|
||||||
running: true
|
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 {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort()
|
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
|
id: watchWallsProc
|
||||||
|
|
||||||
running: true
|
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 {
|
stdout: SplitParser {
|
||||||
onRead: data => {
|
onRead: data => {
|
||||||
if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))
|
if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue