diff --git a/modules/ReloadPopup.qml b/ReloadPopup.qml similarity index 100% rename from modules/ReloadPopup.qml rename to ReloadPopup.qml diff --git a/modules/Shortcuts.qml b/modules/Shortcuts.qml deleted file mode 100644 index 3085709..0000000 --- a/modules/Shortcuts.qml +++ /dev/null @@ -1,14 +0,0 @@ -import Quickshell -import "../widget/" - -Scope { - id: root - - LuxShortcut { - name: 'launcher' - description: 'Open the application launcher' - onPressed: { - console.log("Launcher shortcut pressed"); - } - } -} diff --git a/modules/background/Background.qml b/modules/background/Background.qml new file mode 100644 index 0000000..271f5fa --- /dev/null +++ b/modules/background/Background.qml @@ -0,0 +1,35 @@ +import QtQuick +import Quickshell +import Quickshell.Wayland +import "../../styled/" + +Variants { + model: Quickshell.screens + + StyledWindow { + id: background + + required property ShellScreen modelData + + screen: modelData + name: "background" + WlrLayershell.exclusionMode: ExclusionMode.Ignore + WlrLayershell.layer: WlrLayer.Background + color: "black" + + anchors.top: true + anchors.bottom: true + anchors.left: true + anchors.right: true + + Image { + id: wallpaper + + anchors.fill: parent + + opacity: 1 + + source: "/home/baobeld/Wallpapers/bailey-zindel-NRQV-hBF10M-unsplash.jpg" + } + } +} diff --git a/modules/bar/components/tray/menu/Menu.qml b/modules/bar/components/tray/menu/Menu.qml index 52d1627..d47396a 100644 --- a/modules/bar/components/tray/menu/Menu.qml +++ b/modules/bar/components/tray/menu/Menu.qml @@ -10,25 +10,33 @@ StyledPopupWindow { id: window backgroundColor: Theme.palette.base300 - margins: 8 radius: 8 property QsMenuOpener menuOpener content: ColumnLayout { - spacing: 8 + id: menu + + anchors.margins: 30 + Repeater { + id: repeater model: window.menuOpener.children delegate: Loader { + id: loader + required property QsMenuEntry modelData + required property int index active: true - Layout.fillWidth: true + opacity: 0 + Layout.minimumWidth: 120 sourceComponent: modelData.isSeparator ? menuSeperator : menuItem property Component menuSeperator: Rectangle { + implicitWidth: menu.width implicitHeight: 2 color: Theme.palette.base100 @@ -36,6 +44,45 @@ StyledPopupWindow { property Component menuItem: MenuItem { menuEntry: modelData } + + states: State { + name: "opened" + when: window.opened + PropertyChanges { + loader { + opacity: 1 + } + } + } + + transitions: [ + Transition { + from: "" + to: "opened" + SequentialAnimation { + PauseAnimation { + duration: (repeater.count / root.animationDuration) * loader.index + } + NumberAnimation { + property: "opacity" + duration: 100 + } + } + }, + Transition { + from: "opened" + to: "" + SequentialAnimation { + PauseAnimation { + duration: 15 * (repeater.count - loader.index) + } + NumberAnimation { + property: "opacity" + duration: 200 + } + } + } + ] } } } diff --git a/modules/bar/components/tray/menu/MenuItem.qml b/modules/bar/components/tray/menu/MenuItem.qml index 58b550b..5624ddc 100644 --- a/modules/bar/components/tray/menu/MenuItem.qml +++ b/modules/bar/components/tray/menu/MenuItem.qml @@ -1,3 +1,5 @@ +import QtQuick +import QtQuick.Layouts import Quickshell import "../../../../../config/" import "../../../../../styled/" diff --git a/shell.qml b/shell.qml index 6d3fd32..37db2c9 100644 --- a/shell.qml +++ b/shell.qml @@ -1,11 +1,10 @@ import Quickshell -import "modules" +import "modules/background" import "modules/bar" ShellRoot { ReloadPopup {} + // Background {} Bar {} - - Shortcuts {} } diff --git a/widget/LuxShortcut.qml b/widget/LuxShortcut.qml deleted file mode 100644 index a724552..0000000 --- a/widget/LuxShortcut.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Quickshell.Hyprland - -GlobalShortcut { - appid: "lux" -}