summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js')
-rw-r--r--raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js
new file mode 100644
index 0000000..a2d59a6
--- /dev/null
+++ b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/utils/state.js
@@ -0,0 +1,17 @@
+function openWithSection(root, section) {
+ if (root.shouldBeVisible) {
+ root.close();
+ } else {
+ root.expandedSection = section;
+ root.open();
+ }
+}
+
+function toggleSection(root, section) {
+ if (root.expandedSection === section) {
+ root.expandedSection = "";
+ root.expandedWidgetIndex = -1;
+ } else {
+ root.expandedSection = section;
+ }
+}