From 44443c4a37e8a64286a1ce02c666e98675f87131 Mon Sep 17 00:00:00 2001 From: Pim Rijkers Date: Tue, 8 Jul 2025 14:16:40 +0200 Subject: [PATCH] moved storage from config to persistent state --- .config/quickshell/modules/common/Config.qml | 3 --- .config/quickshell/modules/common/Persistent.qml | 1 + .config/quickshell/modules/common/PersistentStates.qml | 1 + .config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/modules/common/Config.qml b/.config/quickshell/modules/common/Config.qml index 3420549d7..81a8989de 100644 --- a/.config/quickshell/modules/common/Config.qml +++ b/.config/quickshell/modules/common/Config.qml @@ -206,9 +206,6 @@ Singleton { property string username: "[unset]" } } - property JsonObject bottomWidgetRight: JsonObject { - property int lastTab: 0 - } } property JsonObject time: JsonObject { diff --git a/.config/quickshell/modules/common/Persistent.qml b/.config/quickshell/modules/common/Persistent.qml index 62a39e3cb..abd062d73 100644 --- a/.config/quickshell/modules/common/Persistent.qml +++ b/.config/quickshell/modules/common/Persistent.qml @@ -36,6 +36,7 @@ Singleton { property JsonObject sidebar: JsonObject { property JsonObject bottomGroup: JsonObject { property bool collapsed: false + property int tab: 0 } } diff --git a/.config/quickshell/modules/common/PersistentStates.qml b/.config/quickshell/modules/common/PersistentStates.qml index 6887b4795..d65887256 100644 --- a/.config/quickshell/modules/common/PersistentStates.qml +++ b/.config/quickshell/modules/common/PersistentStates.qml @@ -12,6 +12,7 @@ Singleton { property QtObject sidebar: QtObject { property QtObject bottomGroup: QtObject { property bool collapsed: false + property int tab: 0 } } diff --git a/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml b/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml index 50730796f..764258e66 100644 --- a/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml +++ b/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml @@ -14,7 +14,7 @@ Rectangle { color: Appearance.colors.colLayer1 clip: true implicitHeight: collapsed ? collapsedBottomWidgetGroupRow.implicitHeight : bottomWidgetGroupRow.implicitHeight - property int selectedTab: Config.options.sidebar.bottomWidgetRight.lastTab + property int selectedTab: Persistent.states.sidebar.bottomGroup.tab property bool collapsed: Persistent.states.sidebar.bottomGroup.collapsed property var tabs: [ {"type": "calendar", "name": "Calendar", "icon": "calendar_month", "widget": calendarWidget}, @@ -146,7 +146,7 @@ Rectangle { buttonIcon: modelData.icon onClicked: { root.selectedTab = index - Config.options.sidebar.bottomWidgetRight.lastTab = index + Persistent.states.sidebar.bottomGroup.tab = index } } }