forked from Shinonome/dots-hyprland
move common dirs to Directories <--renamed-- XdgDirectories
This commit is contained in:
@@ -139,7 +139,7 @@ Singleton {
|
||||
|
||||
Process {
|
||||
id: getOllamaModels
|
||||
command: ["bash", "-c", `${XdgDirectories.config}/quickshell/scripts/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")]
|
||||
command: ["bash", "-c", `${Directories.config}/quickshell/scripts/ai/show-installed-ollama-models.sh`.replace(/file:\/\//, "")]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
try {
|
||||
|
||||
@@ -17,9 +17,7 @@ import Qt.labs.platform
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property string fileDir: `${XdgDirectories.config}/illogical-impulse`
|
||||
property string fileName: "config.json"
|
||||
property string filePath: FileUtils.trimFileProtocol(`${root.fileDir}/${root.fileName}`)
|
||||
property string filePath: Directories.shellConfigPath
|
||||
property bool firstLoad: true
|
||||
|
||||
function loadConfig() {
|
||||
|
||||
@@ -15,9 +15,9 @@ import Quickshell.Hyprland
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property string keybindParserPath: FileUtils.trimFileProtocol(`${XdgDirectories.config}/quickshell/scripts/hyprland/get_keybinds.py`)
|
||||
property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${XdgDirectories.config}/hypr/hyprland/keybinds.conf`)
|
||||
property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${XdgDirectories.config}/hypr/custom/keybinds.conf`)
|
||||
property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/hyprland/get_keybinds.py`)
|
||||
property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/keybinds.conf`)
|
||||
property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/custom/keybinds.conf`)
|
||||
property var defaultKeybinds: {"children": []}
|
||||
property var userKeybinds: {"children": []}
|
||||
property var keybinds: ({
|
||||
|
||||
@@ -26,14 +26,10 @@ Singleton {
|
||||
property var processedExpressions: ({})
|
||||
property var renderedImagePaths: ({})
|
||||
property string microtexBinaryPath: Qt.resolvedUrl("/opt/MicroTeX/LaTeX")
|
||||
property string latexOutputPath: FileUtils.trimFileProtocol(`${XdgDirectories.cache}/latex`)
|
||||
property string latexOutputPath: Directories.latexOutput
|
||||
|
||||
signal renderFinished(string hash, string imagePath)
|
||||
|
||||
Component.onCompleted: {
|
||||
Hyprland.dispatch(`exec rm -rf ${latexOutputPath} && mkdir -p ${latexOutputPath}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests rendering of a LaTeX expression.
|
||||
* Returns the [hash, isNew]
|
||||
|
||||
@@ -12,7 +12,7 @@ import Quickshell.Io
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property string filePath: `${XdgDirectories.state}/user/generated/colors.json`
|
||||
property string filePath: Directories.generatedMaterialThemePath
|
||||
|
||||
function reapplyTheme() {
|
||||
themeFileView.reload()
|
||||
@@ -44,7 +44,7 @@ Singleton {
|
||||
|
||||
FileView {
|
||||
id: themeFileView
|
||||
path: root.filePath
|
||||
path: Qt.resolvedUrl(root.filePath)
|
||||
watchChanges: true
|
||||
onFileChanged: {
|
||||
this.reload()
|
||||
|
||||
@@ -60,7 +60,7 @@ Singleton {
|
||||
destroy()
|
||||
}
|
||||
}
|
||||
property var filePath: `${XdgDirectories.cache}/notifications/notifications.json`
|
||||
property var filePath: Directories.notificationsPath
|
||||
property list<Notif> list: []
|
||||
property var popupList: list.filter((notif) => notif.popup);
|
||||
property bool popupInhibited: GlobalStates?.sidebarRightOpen ?? false
|
||||
@@ -233,7 +233,7 @@ Singleton {
|
||||
|
||||
FileView {
|
||||
id: notifFileView
|
||||
path: filePath
|
||||
path: Qt.resolvedUrl(filePath)
|
||||
onLoaded: {
|
||||
const fileContents = notifFileView.text()
|
||||
root.list = JSON.parse(fileContents).map((notif) => {
|
||||
|
||||
@@ -15,7 +15,7 @@ import Qt.labs.platform
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property string fileDir: XdgDirectories.state
|
||||
property string fileDir: Directories.state
|
||||
property string fileName: "states.json"
|
||||
property string filePath: `${root.fileDir}/${root.fileName}`
|
||||
property bool allowWriteback: false
|
||||
|
||||
@@ -13,7 +13,7 @@ import QtQuick;
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property var filePath: `${XdgDirectories.state}/user/todo.json`
|
||||
property var filePath: Directories.todoPath
|
||||
property var list: []
|
||||
|
||||
function addItem(item) {
|
||||
@@ -68,7 +68,7 @@ Singleton {
|
||||
|
||||
FileView {
|
||||
id: todoFileView
|
||||
path: filePath
|
||||
path: Qt.resolvedUrl(root.filePath)
|
||||
onLoaded: {
|
||||
const fileContents = todoFileView.text()
|
||||
root.list = JSON.parse(fileContents)
|
||||
|
||||
Reference in New Issue
Block a user