summaryrefslogtreecommitdiff
path: root/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample
diff options
context:
space:
mode:
authornippy <you@example.com>2026-04-18 13:49:56 +0200
committernippy <you@example.com>2026-04-18 13:49:56 +0200
commit5d94c0a7d44a2255b81815a52a7056a94a39842d (patch)
tree759bdea9645c6a62f9e1e4c001f7d81cccd120d2 /raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample
parente79cdf210b267f21a186255ce1a4d50029439d54 (diff)
downloadRaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.tar.gz
RaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.zip
update Raveos themes
Diffstat (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample')
-rw-r--r--raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/ControlCenterExampleWidget.qml68
-rw-r--r--raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/plugin.json12
2 files changed, 80 insertions, 0 deletions
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/ControlCenterExampleWidget.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/ControlCenterExampleWidget.qml
new file mode 100644
index 0000000..450d538
--- /dev/null
+++ b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/ControlCenterExampleWidget.qml
@@ -0,0 +1,68 @@
+import QtQuick
+import Quickshell
+import qs.Common
+import qs.Services
+import qs.Widgets
+import qs.Modules.Plugins
+
+PluginComponent {
+ id: root
+
+ property bool isEnabled: pluginData.isEnabled || false
+ property int clickCount: pluginData.clickCount || 0
+
+ ccWidgetIcon: isEnabled ? "toggle_on" : "toggle_off"
+ ccWidgetPrimaryText: "Example Toggle"
+ ccWidgetSecondaryText: isEnabled ? `Active • ${clickCount} clicks` : "Inactive"
+ ccWidgetIsActive: isEnabled
+
+ onCcWidgetToggled: {
+ isEnabled = !isEnabled
+ clickCount += 1
+ if (pluginService) {
+ pluginService.savePluginData("controlCenterExample", "isEnabled", isEnabled)
+ pluginService.savePluginData("controlCenterExample", "clickCount", clickCount)
+ }
+ ToastService.showInfo("Example Toggle", isEnabled ? "Activated!" : "Deactivated!")
+ }
+
+ horizontalBarPill: Component {
+ Row {
+ spacing: Theme.spacingXS
+
+ DankIcon {
+ name: root.isEnabled ? "toggle_on" : "toggle_off"
+ color: root.isEnabled ? Theme.primary : Theme.surfaceVariantText
+ font.pixelSize: Theme.iconSize - 4
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ StyledText {
+ text: `${root.clickCount}`
+ color: root.isEnabled ? Theme.primary : Theme.surfaceVariantText
+ font.pixelSize: Theme.fontSizeMedium
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+ }
+
+ verticalBarPill: Component {
+ Column {
+ spacing: Theme.spacingXS
+
+ DankIcon {
+ name: root.isEnabled ? "toggle_on" : "toggle_off"
+ color: root.isEnabled ? Theme.primary : Theme.surfaceVariantText
+ font.pixelSize: Theme.iconSize - 4
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ StyledText {
+ text: `${root.clickCount}`
+ color: root.isEnabled ? Theme.primary : Theme.surfaceVariantText
+ font.pixelSize: Theme.fontSizeSmall
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+ }
+}
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/plugin.json b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/plugin.json
new file mode 100644
index 0000000..f573ae6
--- /dev/null
+++ b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/PLUGINS/ControlCenterExample/plugin.json
@@ -0,0 +1,12 @@
+{
+ "id": "controlCenterExample",
+ "name": "CC Toggle Example",
+ "description": "Example plugin with Control Center toggle widget",
+ "version": "1.0.0",
+ "author": "DankMaterialShell",
+ "type": "widget",
+ "capabilities": ["control-center"],
+ "component": "./ControlCenterExampleWidget.qml",
+ "icon": "toggle_on",
+ "permissions": ["settings_read", "settings_write"]
+}