From a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5 Mon Sep 17 00:00:00 2001 From: Nippy Date: Sat, 9 May 2026 13:33:09 +0200 Subject: raveos update --- .../PopoutControlExample/PopoutControlSettings.qml | 98 ---------- .../PopoutControlExample/PopoutControlWidget.qml | 93 --------- .../PLUGINS/PopoutControlExample/README.md | 208 --------------------- .../PLUGINS/PopoutControlExample/plugin.json | 13 -- 4 files changed, 412 deletions(-) delete mode 100644 raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlSettings.qml delete mode 100644 raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlWidget.qml delete mode 100644 raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/README.md delete mode 100644 raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/plugin.json (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample') diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlSettings.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlSettings.qml deleted file mode 100644 index 374af30..0000000 --- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlSettings.qml +++ /dev/null @@ -1,98 +0,0 @@ -import QtQuick -import qs.Common -import qs.Widgets -import qs.Modules.Plugins - -PluginSettings { - id: root - pluginId: "popoutControlExample" - - StyledText { - width: parent.width - text: "Popout Control Settings" - font.pixelSize: Theme.fontSizeLarge - font.weight: Font.Bold - color: Theme.surfaceText - } - - StyledText { - width: parent.width - text: "Choose which popout/modal will open when clicking the widget" - font.pixelSize: Theme.fontSizeSmall - color: Theme.surfaceVariantText - wrapMode: Text.WordWrap - } - - SelectionSetting { - settingKey: "selectedPopout" - label: "Popout to Open" - description: "Select which popout or modal opens when you click the widget" - options: [ - { - label: "Control Center", - value: "controlCenter" - }, - { - label: "Notification Center", - value: "notificationCenter" - }, - { - label: "App Drawer", - value: "appDrawer" - }, - { - label: "Process List", - value: "processList" - }, - { - label: "DankDash", - value: "dankDash" - }, - { - label: "Battery Info", - value: "battery" - }, - { - label: "VPN", - value: "vpn" - }, - { - label: "System Update", - value: "systemUpdate" - }, - { - label: "Settings", - value: "settings" - }, - { - label: "Clipboard History", - value: "clipboardHistory" - }, - { - label: "Spotlight", - value: "spotlight" - }, - { - label: "Power Menu", - value: "powerMenu" - }, - { - label: "Color Picker", - value: "colorPicker" - }, - { - label: "Notepad", - value: "notepad" - } - ] - defaultValue: "controlCenter" - } - - StyledText { - width: parent.width - text: "💡 Tip: The widget displays the name of the selected popout and opens it when clicked!" - font.pixelSize: Theme.fontSizeSmall - color: Theme.surfaceVariantText - wrapMode: Text.WordWrap - } -} diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlWidget.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlWidget.qml deleted file mode 100644 index fdbf89f..0000000 --- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/PopoutControlWidget.qml +++ /dev/null @@ -1,93 +0,0 @@ -import QtQuick -import qs.Common -import qs.Widgets -import qs.Modules.Plugins - -PluginComponent { - id: root - - property var popoutService: null - - property string selectedPopout: pluginData.selectedPopout || "controlCenter" - - property var popoutActions: ({ - "controlCenter": (x, y, w, s, scr) => popoutService?.toggleControlCenter(x, y, w, s, scr), - "notificationCenter": (x, y, w, s, scr) => popoutService?.toggleNotificationCenter(x, y, w, s, scr), - "appDrawer": (x, y, w, s, scr) => popoutService?.toggleAppDrawer(x, y, w, s, scr), - "processList": (x, y, w, s, scr) => popoutService?.toggleProcessList(x, y, w, s, scr), - "dankDash": (x, y, w, s, scr) => popoutService?.toggleDankDash(0, x, y, w, s, scr), - "battery": (x, y, w, s, scr) => popoutService?.toggleBattery(x, y, w, s, scr), - "vpn": (x, y, w, s, scr) => popoutService?.toggleVpn(x, y, w, s, scr), - "systemUpdate": (x, y, w, s, scr) => popoutService?.toggleSystemUpdate(x, y, w, s, scr), - "settings": () => popoutService?.openSettings(), - "clipboardHistory": () => popoutService?.openClipboardHistory(), - "spotlight": () => popoutService?.toggleDankLauncherV2(), - "powerMenu": () => popoutService?.togglePowerMenu(), - "colorPicker": () => popoutService?.showColorPicker(), - "notepad": () => popoutService?.toggleNotepad() - }) - - property var popoutNames: ({ - "controlCenter": "Control Center", - "notificationCenter": "Notification Center", - "appDrawer": "App Drawer", - "processList": "Process List", - "dankDash": "DankDash", - "battery": "Battery Info", - "vpn": "VPN", - "systemUpdate": "System Update", - "settings": "Settings", - "clipboardHistory": "Clipboard", - "spotlight": "Spotlight", - "powerMenu": "Power Menu", - "colorPicker": "Color Picker", - "notepad": "Notepad" - }) - - pillClickAction: (x, y, width, section, screen) => { - if (popoutActions[selectedPopout]) { - popoutActions[selectedPopout](x, y, width, section, screen); - } - } - - horizontalBarPill: Component { - Row { - spacing: Theme.spacingXS - - DankIcon { - name: "widgets" - color: Theme.primary - font.pixelSize: Theme.iconSize - 6 - anchors.verticalCenter: parent.verticalCenter - } - - StyledText { - text: popoutNames[selectedPopout] || "Popouts" - color: Theme.primary - font.pixelSize: Theme.fontSizeMedium - anchors.verticalCenter: parent.verticalCenter - } - } - } - - verticalBarPill: Component { - Column { - spacing: Theme.spacingXS - - DankIcon { - name: "widgets" - color: Theme.primary - font.pixelSize: Theme.iconSize - 6 - anchors.horizontalCenter: parent.horizontalCenter - } - - StyledText { - text: popoutNames[selectedPopout] || "Popouts" - color: Theme.primary - font.pixelSize: Theme.fontSizeSmall - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - } - } - } -} diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/README.md b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/README.md deleted file mode 100644 index d1fb54a..0000000 --- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/README.md +++ /dev/null @@ -1,208 +0,0 @@ -# Popout Control Example Plugin - -This example plugin demonstrates: -- Using `PopoutService` to trigger positioned popouts and modals -- Using `pillClickAction` with position parameters -- Using `PluginSettings` with dropdown selection -- Dynamic widget text based on settings - -The `pillClickAction` receives position parameters `(x, y, width, section, screen)` which are passed to PopoutService functions to properly position popouts relative to the widget. - -## PopoutService API - -The `PopoutService` is automatically injected into plugin widgets and daemons as `popoutService`. It provides access to all shell popouts and modals. - -### Available Popouts - -#### Control Center -```qml -popoutService.openControlCenter() -popoutService.closeControlCenter() -popoutService.toggleControlCenter() -``` - -#### Notification Center -```qml -popoutService.openNotificationCenter() -popoutService.closeNotificationCenter() -popoutService.toggleNotificationCenter() -``` - -#### App Drawer -```qml -popoutService.openAppDrawer() -popoutService.closeAppDrawer() -popoutService.toggleAppDrawer() -``` - -#### Process List (Popout) -```qml -popoutService.openProcessList() -popoutService.closeProcessList() -popoutService.toggleProcessList() -``` - -#### DankDash -```qml -popoutService.openDankDash(tabIndex) // tabIndex: 0=Calendar, 1=Media, 2=Weather -popoutService.closeDankDash() -popoutService.toggleDankDash(tabIndex) -``` - -#### Battery Popout -```qml -popoutService.openBattery() -popoutService.closeBattery() -popoutService.toggleBattery() -``` - -#### VPN Popout -```qml -popoutService.openVpn() -popoutService.closeVpn() -popoutService.toggleVpn() -``` - -#### System Update Popout -```qml -popoutService.openSystemUpdate() -popoutService.closeSystemUpdate() -popoutService.toggleSystemUpdate() -``` - -### Available Modals - -#### Settings Modal -```qml -popoutService.openSettings() -popoutService.closeSettings() -``` - -#### Clipboard History Modal -```qml -popoutService.openClipboardHistory() -popoutService.closeClipboardHistory() -``` - -#### Launcher Modal -```qml -popoutService.openDankLauncherV2() -popoutService.closeDankLauncherV2() -popoutService.toggleDankLauncherV2() -``` - -#### Power Menu Modal -```qml -popoutService.openPowerMenu() -popoutService.closePowerMenu() -popoutService.togglePowerMenu() -``` - -#### Process List Modal (fullscreen) -```qml -popoutService.showProcessListModal() -popoutService.hideProcessListModal() -popoutService.toggleProcessListModal() -``` - -#### Color Picker Modal -```qml -popoutService.showColorPicker() -popoutService.hideColorPicker() -``` - -#### Notification Modal -```qml -popoutService.showNotificationModal() -popoutService.hideNotificationModal() -``` - -#### WiFi Password Modal -```qml -popoutService.showWifiPasswordModal() -popoutService.hideWifiPasswordModal() -``` - -#### Network Info Modal -```qml -popoutService.showNetworkInfoModal() -popoutService.hideNetworkInfoModal() -``` - -#### Notepad Slideout -```qml -popoutService.openNotepad() -popoutService.closeNotepad() -popoutService.toggleNotepad() -``` - -## Usage in Plugins - -### Widget Plugins - -```qml -import QtQuick -import qs.Common -import qs.Widgets - -Rectangle { - id: root - - property var popoutService: null // REQUIRED: Must declare for injection - - MouseArea { - anchors.fill: parent - onClicked: { - popoutService?.toggleControlCenter() - } - } -} -``` - -### Daemon Plugins - -```qml -import QtQuick -import qs.Services - -Item { - id: root - - property var popoutService: null // REQUIRED: Must declare for injection - - Connections { - target: NotificationService - function onNotificationReceived() { - popoutService?.openNotificationCenter() - } - } -} -``` - -**Important**: The `popoutService` property **must** be declared in your plugin component. Without it, you'll get errors like: -``` -Error: Cannot assign to non-existent property "popoutService" -``` - -## Example Use Cases - -1. **Custom Launcher**: Create a widget that opens the app drawer -2. **Quick Settings**: Toggle control center from a custom button -3. **Notification Manager**: Open notification center on new notifications -4. **System Monitor**: Open process list on high CPU usage -5. **Power Management**: Trigger power menu from a custom widget - -## Installation - -1. Copy the plugin directory to `~/.config/DankMaterialShell/plugins/` -2. Open Settings → Plugins -3. Click "Scan for Plugins" -4. Enable "Popout Control Example" -5. Add `popoutControlExample` to your DankBar widget list - -## Notes - -- The `popoutService` property is automatically injected - no manual setup required -- Always use optional chaining (`?.`) when calling methods to handle null cases -- Popouts are lazily loaded - first access may activate the loader -- Some popouts require specific system features to be available diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/plugin.json b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/plugin.json deleted file mode 100644 index 02042a0..0000000 --- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/PLUGINS/PopoutControlExample/plugin.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "popoutControlExample", - "name": "Popout Control Example", - "description": "Example widget demonstrating PopoutService usage with pillClickAction", - "version": "1.0.0", - "author": "DankMaterialShell", - "type": "widget", - "capabilities": ["dankbar-widget"], - "component": "./PopoutControlWidget.qml", - "icon": "widgets", - "settings": "./PopoutControlSettings.qml", - "permissions": ["settings_read", "settings_write"] -} -- cgit v1.3