diff options
| author | Tim Hämisch <tim@thaemisch.net> | 2025-06-15 13:40:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 13:40:47 +0200 |
| commit | 68874082b4cfee63feaecc0640646ad0ba753da7 (patch) | |
| tree | 815a1113a4bd83373283253a35f0220a08a8cfe6 /config | |
| parent | launcher: use standard logout command (diff) | |
| parent | dashboard: fix uptime (diff) | |
| download | caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.gz caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.bz2 caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.zip | |
Merge branch 'main' into betteractions
Diffstat (limited to 'config')
| -rw-r--r-- | config/BarConfig.qml | 16 | ||||
| -rw-r--r-- | config/BorderConfig.qml | 14 | ||||
| -rw-r--r-- | config/Config.qml | 36 | ||||
| -rw-r--r-- | config/DashboardConfig.qml | 14 | ||||
| -rw-r--r-- | config/LauncherConfig.qml | 26 | ||||
| -rw-r--r-- | config/NotifsConfig.qml | 26 | ||||
| -rw-r--r-- | config/OsdConfig.qml | 16 | ||||
| -rw-r--r-- | config/SessionConfig.qml | 14 |
8 files changed, 83 insertions, 79 deletions
diff --git a/config/BarConfig.qml b/config/BarConfig.qml index 21f9314..31577c4 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -1,22 +1,14 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick - -Singleton { - id: root - - readonly property Sizes sizes: Sizes {} - readonly property Workspaces workspaces: Workspaces {} - - component Sizes: QtObject { +JsonObject { + property JsonObject sizes: JsonObject { property int innerHeight: 30 property int windowPreviewSize: 400 property int trayMenuWidth: 300 property int batteryWidth: 250 } - component Workspaces: QtObject { + property JsonObject workspaces: JsonObject { property int shown: 5 property bool rounded: true property bool activeIndicator: true diff --git a/config/BorderConfig.qml b/config/BorderConfig.qml index a69cf59..7e95054 100644 --- a/config/BorderConfig.qml +++ b/config/BorderConfig.qml @@ -1,13 +1,9 @@ -pragma Singleton - import "root:/services" -import Quickshell +import Quickshell.Io import QtQuick -Singleton { - id: root - - readonly property color colour: Colours.palette.m3surface - readonly property int thickness: Appearance.padding.normal - readonly property int rounding: Appearance.rounding.large +JsonObject { + property color colour: Colours.palette.m3surface + property int thickness: Appearance.padding.normal + property int rounding: Appearance.rounding.large } diff --git a/config/Config.qml b/config/Config.qml new file mode 100644 index 0000000..2e1e48b --- /dev/null +++ b/config/Config.qml @@ -0,0 +1,36 @@ +pragma Singleton + +import "root:/utils" +import Quickshell +import Quickshell.Io + +Singleton { + id: root + + property alias bar: adapter.bar + property alias border: adapter.border + property alias dashboard: adapter.dashboard + property alias launcher: adapter.launcher + property alias notifs: adapter.notifs + property alias osd: adapter.osd + property alias session: adapter.session + + FileView { + path: `${Paths.config}/shell.json` + watchChanges: true + onFileChanged: reload() + onAdapterUpdated: writeAdapter() + + JsonAdapter { + id: adapter + + property JsonObject bar: BarConfig {} + property JsonObject border: BorderConfig {} + property JsonObject dashboard: DashboardConfig {} + property JsonObject launcher: LauncherConfig {} + property JsonObject notifs: NotifsConfig {} + property JsonObject osd: OsdConfig {} + property JsonObject session: SessionConfig {} + } + } +} diff --git a/config/DashboardConfig.qml b/config/DashboardConfig.qml index 3c32e07..269d4b4 100644 --- a/config/DashboardConfig.qml +++ b/config/DashboardConfig.qml @@ -1,14 +1,10 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick +JsonObject { + property int mediaUpdateInterval: 500 + property int visualiserBars: 45 -Singleton { - readonly property int mediaUpdateInterval: 500 - readonly property int visualiserBars: 45 - readonly property Sizes sizes: Sizes {} - - component Sizes: QtObject { + property JsonObject sizes: JsonObject { readonly property int tabIndicatorHeight: 3 readonly property int tabIndicatorSpacing: 5 readonly property int infoWidth: 200 diff --git a/config/LauncherConfig.qml b/config/LauncherConfig.qml index a3c154f..1757c7e 100644 --- a/config/LauncherConfig.qml +++ b/config/LauncherConfig.qml @@ -1,19 +1,15 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick +JsonObject { + property int maxShown: 8 + property int maxWallpapers: 9 // Warning: even numbers look bad + property string actionPrefix: ">" + property bool allowDangerousActions: false // Allow actions that can change the system state, like shutdown, reboot and logout -Singleton { - readonly property int maxShown: 8 - readonly property int maxWallpapers: 9 // Warning: even numbers look bad - readonly property string actionPrefix: ">" - readonly property Sizes sizes: Sizes {} - readonly property bool allowDangerousActions: false // Allow actions that can change the system state, like shutdown, reboot and logout - - component Sizes: QtObject { - readonly property int itemWidth: 600 - readonly property int itemHeight: 57 - readonly property int wallpaperWidth: 280 - readonly property int wallpaperHeight: 200 + property JsonObject sizes: JsonObject { + property int itemWidth: 600 + property int itemHeight: 57 + property int wallpaperWidth: 280 + property int wallpaperHeight: 200 } } diff --git a/config/NotifsConfig.qml b/config/NotifsConfig.qml index 34b9226..f84def2 100644 --- a/config/NotifsConfig.qml +++ b/config/NotifsConfig.qml @@ -1,19 +1,15 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick +JsonObject { + property bool expire: false + property int defaultExpireTimeout: 3000 + property real clearThreshold: 0.3 + property int expandThreshold: 20 + property bool actionOnClick: false -Singleton { - readonly property bool expire: false - readonly property int defaultExpireTimeout: 3000 - readonly property real clearThreshold: 0.3 - readonly property int expandThreshold: 20 - readonly property bool actionOnClick: false - readonly property Sizes sizes: Sizes {} - - component Sizes: QtObject { - readonly property int width: 400 - readonly property int image: 41 - readonly property int badge: 20 + property JsonObject sizes: JsonObject { + property int width: 400 + property int image: 41 + property int badge: 20 } } diff --git a/config/OsdConfig.qml b/config/OsdConfig.qml index 467d8e7..7275e22 100644 --- a/config/OsdConfig.qml +++ b/config/OsdConfig.qml @@ -1,14 +1,10 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick +JsonObject { + property int hideDelay: 2000 -Singleton { - readonly property int hideDelay: 2000 - readonly property Sizes sizes: Sizes {} - - component Sizes: QtObject { - readonly property int sliderWidth: 30 - readonly property int sliderHeight: 150 + property JsonObject sizes: JsonObject { + property int sliderWidth: 30 + property int sliderHeight: 150 } } diff --git a/config/SessionConfig.qml b/config/SessionConfig.qml index c72d2f1..0915469 100644 --- a/config/SessionConfig.qml +++ b/config/SessionConfig.qml @@ -1,13 +1,9 @@ -pragma Singleton +import Quickshell.Io -import Quickshell -import QtQuick +JsonObject { + property int dragThreshold: 30 -Singleton { - readonly property int dragThreshold: 30 - readonly property Sizes sizes: Sizes {} - - component Sizes: QtObject { - readonly property int button: 80 + property JsonObject sizes: JsonObject { + property int button: 80 } } |