organize files
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
function getTrayIcon(id: string, icon: string): string {
|
||||
if (icon.includes("?path=")) {
|
||||
const [name, path] = icon.split("?path=");
|
||||
icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`);
|
||||
} else if (icon.includes("qspixmap") && id === "chrome_status_icon_1") {
|
||||
icon = icon.replace("qspixmap", "icon/discord-tray");
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import qs.Modules
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import qs.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property var args
|
||||
readonly property string mode: Config.general.color.mode
|
||||
readonly property string threshold: mode === "dark" ? "--threshold=9" : "--dynamic-threshold"
|
||||
|
||||
function generateColors(wallpaperPath) {
|
||||
root.args = wallpaperPath;
|
||||
wallustProc.running = true;
|
||||
}
|
||||
|
||||
Process {
|
||||
id: wallustProc
|
||||
command: ["wallust", "run", root.args, `--palette=${root.mode}`, "--ignore-sequence=cursor", `${root.threshold}` ]
|
||||
running: false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user