summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--config/BackgroundConfig.qml5
-rw-r--r--config/Config.qml2
-rw-r--r--modules/background/Background.qml35
4 files changed, 30 insertions, 15 deletions
diff --git a/README.md b/README.md
index 7d266eb..f2a0ff5 100644
--- a/README.md
+++ b/README.md
@@ -146,6 +146,9 @@ All configuration options are in `~/.config/caelestia/shell.json`.
```json
{
+ "background": {
+ "enabled": true
+ },
"bar": {
"dragThreshold": 20,
"persistent": true,
diff --git a/config/BackgroundConfig.qml b/config/BackgroundConfig.qml
new file mode 100644
index 0000000..9bcca87
--- /dev/null
+++ b/config/BackgroundConfig.qml
@@ -0,0 +1,5 @@
+import Quickshell.Io
+
+JsonObject {
+ property bool enabled: true
+}
diff --git a/config/Config.qml b/config/Config.qml
index e713023..1ab8cb4 100644
--- a/config/Config.qml
+++ b/config/Config.qml
@@ -7,6 +7,7 @@ import Quickshell.Io
Singleton {
id: root
+ property alias background: adapter.background
property alias bar: adapter.bar
property alias border: adapter.border
property alias dashboard: adapter.dashboard
@@ -28,6 +29,7 @@ Singleton {
JsonAdapter {
id: adapter
+ property BackgroundConfig background: BackgroundConfig {}
property BarConfig bar: BarConfig {}
property BorderConfig border: BorderConfig {}
property DashboardConfig dashboard: DashboardConfig {}
diff --git a/modules/background/Background.qml b/modules/background/Background.qml
index 72748d8..c744baa 100644
--- a/modules/background/Background.qml
+++ b/modules/background/Background.qml
@@ -1,26 +1,31 @@
import qs.widgets
+import qs.config
import Quickshell
import Quickshell.Wayland
-Variants {
- model: Quickshell.screens
+LazyLoader {
+ activeAsync: Config.background.enabled
- StyledWindow {
- id: win
+ Variants {
+ model: Quickshell.screens
- required property ShellScreen modelData
+ StyledWindow {
+ id: win
- screen: modelData
- name: "background"
- WlrLayershell.exclusionMode: ExclusionMode.Ignore
- WlrLayershell.layer: WlrLayer.Background
- color: "black"
+ required property ShellScreen modelData
- anchors.top: true
- anchors.bottom: true
- anchors.left: true
- anchors.right: true
+ screen: modelData
+ name: "background"
+ WlrLayershell.exclusionMode: ExclusionMode.Ignore
+ WlrLayershell.layer: WlrLayer.Background
+ color: "black"
- Wallpaper {}
+ anchors.top: true
+ anchors.bottom: true
+ anchors.left: true
+ anchors.right: true
+
+ Wallpaper {}
+ }
}
}