Conditional Overview.qml loading
This commit is contained in:
parent
f2b7bd04db
commit
cc0ea7f37a
1 changed files with 16 additions and 3 deletions
|
|
@ -3,11 +3,23 @@ import QtQuick.Effects
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import qs.Services
|
import qs.Services
|
||||||
|
import qs.Widgets
|
||||||
|
|
||||||
Variants {
|
NLoader {
|
||||||
model: Quickshell.screens
|
active: Workspaces.isNiri
|
||||||
|
|
||||||
delegate: PanelWindow {
|
Component.onCompleted: {
|
||||||
|
if (Workspaces.isNiri) {
|
||||||
|
console.log("[Overview] Loading Overview component (Niri detected)")
|
||||||
|
} else {
|
||||||
|
console.log("[Overview] Skipping Overview component (Niri not detected)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceComponent: Variants {
|
||||||
|
model: Quickshell.screens
|
||||||
|
|
||||||
|
delegate: PanelWindow {
|
||||||
required property ShellScreen modelData
|
required property ShellScreen modelData
|
||||||
property string wallpaperSource: Wallpapers.currentWallpaper !== ""
|
property string wallpaperSource: Wallpapers.currentWallpaper !== ""
|
||||||
&& !Settings.data.wallpaper.swww.enabled ? Wallpapers.currentWallpaper : ""
|
&& !Settings.data.wallpaper.swww.enabled ? Wallpapers.currentWallpaper : ""
|
||||||
|
|
@ -53,4 +65,5 @@ Variants {
|
||||||
color: Qt.rgba(Colors.backgroundPrimary.r, Colors.backgroundPrimary.g, Colors.backgroundPrimary.b, 0.5)
|
color: Qt.rgba(Colors.backgroundPrimary.r, Colors.backgroundPrimary.g, Colors.backgroundPrimary.b, 0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue