config: allow disabling background

Closes #208
This commit is contained in:
2 * r + 2 * t 2025-07-20 16:43:47 +10:00
parent 7412052d12
commit 4cd554d191
4 changed files with 30 additions and 15 deletions

View file

@ -146,6 +146,9 @@ All configuration options are in `~/.config/caelestia/shell.json`.
```json
{
"background": {
"enabled": true
},
"bar": {
"dragThreshold": 20,
"persistent": true,

View file

@ -0,0 +1,5 @@
import Quickshell.Io
JsonObject {
property bool enabled: true
}

View file

@ -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 {}

View file

@ -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 {}
}
}
}