diff --git a/components/StyledImage.qml b/components/StyledImage.qml new file mode 100644 index 0000000..d7d7081 --- /dev/null +++ b/components/StyledImage.qml @@ -0,0 +1,17 @@ +import qs.config +import QtQuick +import Quickshell.Widgets + +Image { + + property alias radius: rectangle.radius + property alias skeletonColor: rectangle.color + + ClippingRectangle { + id: rectangle + + color: Styling.theme.base200 + + anchors.fill: parent + } +} diff --git a/config/Config.qml b/config/Config.qml index 2cd8ea0..036f14c 100644 --- a/config/Config.qml +++ b/config/Config.qml @@ -1,9 +1,33 @@ pragma Singleton import Quickshell +import Quickshell.Io Singleton { id: root - readonly property PowerMenu powermenu: PowerMenu {} + readonly property alias powermenu: adapter.powermenu + + FileView { + path: `${Paths.config}/shell.json` + watchChanges: true + onFileChanged: reload() + + // onAdapterUpdated: writeAdapter() + + JsonAdapter { + id: adapter + + property var powermenu: PowerMenu {} + } + } + + component PowerMenu: JsonObject { + property list actions + } + + component PowerMenuItem: JsonObject { + property string text + property string command + } } diff --git a/config/Paths.qml b/config/Paths.qml index 34116da..2fb9e08 100644 --- a/config/Paths.qml +++ b/config/Paths.qml @@ -14,8 +14,6 @@ Singleton { readonly property url cache: `${StandardPaths.standardLocations(StandardPaths.GenericCacheLocation)[0]}/lux` readonly property url config: `${StandardPaths.standardLocations(StandardPaths.GenericConfigLocation)[0]}/lux` - readonly property url imagecache: `${cache}/imagecache` - function stringify(path: url): string { let str = path.toString(); if (str.startsWith("root:/")) diff --git a/config/PowerMenu.qml b/config/PowerMenu.qml deleted file mode 100644 index 0046bd9..0000000 --- a/config/PowerMenu.qml +++ /dev/null @@ -1,18 +0,0 @@ -import Quickshell - -PersistentProperties { - property list actions: [ - { - text: "󰍃 Logout", - command: "hyprctl dispatch exit" - }, - { - text: "󰜉 Reboot", - command: "systemctl reboot" - }, - { - text: " Shutdown", - command: "systemctl poweroff" - } - ] -}