forked from Shinonome/dots-hyprland
refractor xdg dirs
This commit is contained in:
@@ -11,7 +11,6 @@ import QtQuick;
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property string xdgConfigHome: StandardPaths.standardLocations(StandardPaths.ConfigLocation)[0]
|
||||
readonly property string interfaceRole: "interface"
|
||||
readonly property string apiKeyEnvVarName: "API_KEY"
|
||||
property Component aiMessageComponent: AiMessageData {}
|
||||
@@ -107,7 +106,7 @@ Singleton {
|
||||
|
||||
Process {
|
||||
id: getOllamaModels
|
||||
command: ["bash", "-c", `${xdgConfigHome}/quickshell/scripts/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")]
|
||||
command: ["bash", "-c", `${XdgDirectories.config}/quickshell/scripts/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
try {
|
||||
|
||||
@@ -12,7 +12,7 @@ import Qt.labs.platform
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property string fileDir: `${StandardPaths.standardLocations(StandardPaths.ConfigLocation)[0]}/illogical-impulse`
|
||||
property string fileDir: `${XdgDirectories.config}/illogical-impulse`
|
||||
property string fileName: "config.json"
|
||||
property string filePath: FileUtils.trimFileProtocol(`${root.fileDir}/${root.fileName}`)
|
||||
property bool firstLoad: true
|
||||
|
||||
@@ -26,7 +26,7 @@ Singleton {
|
||||
property var processedExpressions: ({})
|
||||
property var renderedImagePaths: ({})
|
||||
property string microtexBinaryPath: Qt.resolvedUrl("/opt/MicroTeX/LaTeX")
|
||||
property string latexOutputPath: FileUtils.trimFileProtocol(`${StandardPaths.standardLocations(StandardPaths.CacheLocation)[0]}/latex`)
|
||||
property string latexOutputPath: FileUtils.trimFileProtocol(`${XdgDirectories.cache}/latex`)
|
||||
|
||||
signal renderFinished(string hash, string imagePath)
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@ import "root:/modules/common"
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Qt.labs.platform
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property string filePath: `${StandardPaths.standardLocations(StandardPaths.StateLocation)[0]}/user/generated/colors.json`
|
||||
property string filePath: `${XdgDirectories.state}/user/generated/colors.json`
|
||||
|
||||
function reapplyTheme() {
|
||||
themeFileView.reload()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
@@ -9,10 +10,10 @@ import Qt.labs.platform
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property var filePath: `${StandardPaths.standardLocations(StandardPaths.CacheLocation)[0]}/notifications/notifications.json`
|
||||
property var filePath: `${XdgDirectories.cache}/notifications/notifications.json`
|
||||
property var list: []
|
||||
// Quickshell's notification IDs starts at 1 on each run, while saved notifications
|
||||
// can already contain higher IDs. This is a workaround to avoid id collisions
|
||||
// can already contain higher IDs. This is for avoiding id collisions
|
||||
property int idOffset
|
||||
|
||||
signal initDone();
|
||||
|
||||
@@ -11,7 +11,7 @@ import Qt.labs.platform
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property string fileDir: `${StandardPaths.standardLocations(StandardPaths.StateLocation)[0]}`
|
||||
property string fileDir: XdgDirectories.state
|
||||
property string fileName: "states.json"
|
||||
property string filePath: `${root.fileDir}/${root.fileName}`
|
||||
property bool allowWriteback: false
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import Quickshell;
|
||||
import Quickshell.Io;
|
||||
import Qt.labs.platform
|
||||
@@ -8,7 +9,7 @@ import QtQuick;
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property var filePath: `${StandardPaths.standardLocations(StandardPaths.StateLocation)[0]}/user/todo.json`
|
||||
property var filePath: `${XdgDirectories.state}/user/todo.json`
|
||||
property var list: []
|
||||
|
||||
function addItem(item) {
|
||||
|
||||
Reference in New Issue
Block a user