forked from Shinonome/dots-hyprland
quickshell: use qs imports instead of root:/
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import "root:/modules/common/functions/object_utils.js" as ObjectUtils
|
||||
import "root:/modules/common"
|
||||
import "root:/"
|
||||
import Quickshell;
|
||||
import Quickshell.Io;
|
||||
import Qt.labs.platform
|
||||
import QtQuick;
|
||||
import qs.modules.common.functions as CF
|
||||
import qs.modules.common
|
||||
import qs
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
||||
/**
|
||||
* Basic service to handle LLM chats. Supports Google's and OpenAI's API formats.
|
||||
@@ -575,7 +573,7 @@ Singleton {
|
||||
const requestCommandString = `curl --no-buffer "${endpoint}"`
|
||||
+ ` ${headerString}`
|
||||
+ ((apiFormat == "gemini") ? "" : ` -H "Authorization: Bearer \$\{${root.apiKeyEnvVarName}\}"`)
|
||||
+ ` -d '${StringUtils.shellSingleQuoteEscape(JSON.stringify(data))}'`
|
||||
+ ` -d '${CF.StringUtils.shellSingleQuoteEscape(JSON.stringify(data))}'`
|
||||
// console.log("Request command: ", requestCommandString);
|
||||
requester.command = baseCommand.concat([requestCommandString]);
|
||||
|
||||
@@ -790,7 +788,7 @@ Singleton {
|
||||
addFunctionOutputMessage(name, Translation.tr("Switched to search mode. Continue with the user's request."))
|
||||
requester.makeRequest();
|
||||
} else if (name === "get_shell_config") {
|
||||
const configJson = ObjectUtils.toPlainObject(Config.options)
|
||||
const configJson = CF.ObjectUtils.toPlainObject(Config.options)
|
||||
addFunctionOutputMessage(name, JSON.stringify(configJson));
|
||||
requester.makeRequest();
|
||||
} else if (name === "set_shell_config") {
|
||||
@@ -857,7 +855,7 @@ Singleton {
|
||||
root.messageIDs = saveData.map((_, i) => {
|
||||
return i
|
||||
})
|
||||
console.log(JSON.stringify(messageIDs))
|
||||
// console.log(JSON.stringify(messageIDs))
|
||||
for (let i = 0; i < saveData.length; i++) {
|
||||
const message = saveData[i];
|
||||
root.messageByID[i] = root.aiMessageComponent.createObject(root, {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
pragma Singleton
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import "root:/modules/common/functions/fuzzysort.js" as Fuzzy
|
||||
import "root:/modules/common/functions/levendist.js" as Levendist
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
/**
|
||||
* - Eases fuzzy searching for applications by name
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Pipewire
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
pragma Singleton
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs
|
||||
import qs.modules.common
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.UPower
|
||||
|
||||
Singleton {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import "root:/"
|
||||
import qs.modules.common
|
||||
import qs
|
||||
import Quickshell;
|
||||
import Quickshell.Io;
|
||||
import Qt.labs.platform
|
||||
import QtQuick;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ pragma ComponentBehavior: Bound
|
||||
// From https://github.com/caelestia-dots/shell/ (`quickshell` branch) with modifications.
|
||||
// License: GPLv3
|
||||
|
||||
import "root:/"
|
||||
import qs
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
@@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common/functions/fuzzysort.js" as Fuzzy
|
||||
import "root:/modules/common/functions/levendist.js" as Levendist
|
||||
import "root:/modules/common"
|
||||
import "root:/"
|
||||
import qs.modules.common
|
||||
import qs
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common/functions/fuzzysort.js" as Fuzzy
|
||||
import "root:/modules/common/functions/levendist.js" as Levendist
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
pragma Singleton
|
||||
|
||||
import "root:/modules/common/functions/file_utils.js" as FileUtils
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -4,7 +4,6 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/functions/file_utils.js" as FileUtils
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
import "root:/"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import qs
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import Quickshell;
|
||||
import Quickshell.Io;
|
||||
import Qt.labs.platform
|
||||
import QtQuick;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import "root:/modules/common/functions/file_utils.js" as FileUtils
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
import Qt.labs.platform
|
||||
|
||||
/**
|
||||
* Renders LaTeX snippets with MicroTeX.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -4,7 +4,7 @@ pragma ComponentBehavior: Bound
|
||||
// From https://git.outfoxxed.me/outfoxxed/nixnew
|
||||
// It does not have a license, but the author is okay with redistribution.
|
||||
|
||||
import "root:/"
|
||||
import qs
|
||||
import QtQml.Models
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import "root:/"
|
||||
import qs.modules.common
|
||||
import qs
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import Quickshell;
|
||||
import Quickshell.Io;
|
||||
import Qt.labs.platform
|
||||
import QtQuick;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtPositioning
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
pragma Singleton
|
||||
|
||||
import "root:/modules/common"
|
||||
import qs.modules.common
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -12,12 +10,6 @@ Singleton {
|
||||
property list<int> altKeys: [56, 100] // Keycodes for Alt keys (left and right)
|
||||
property list<int> ctrlKeys: [29, 97] // Keycodes for Ctrl keys (left and right)
|
||||
|
||||
onShiftModeChanged: {
|
||||
if (shiftMode === 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function releaseAllKeys() {
|
||||
const keycodes = Array.from(Array(249).keys());
|
||||
Quickshell.execDetached([
|
||||
|
||||
Reference in New Issue
Block a user