mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Initial hyprland workspace support
This commit is contained in:
@@ -19,6 +19,7 @@ Singleton {
|
||||
readonly property string niriSocket: Quickshell.env("NIRI_SOCKET")
|
||||
|
||||
property bool useNiriSorting: isNiri && NiriService
|
||||
property bool useHyprlandSorting: isHyprland && HyprlandService
|
||||
|
||||
// Unified sorted toplevels - automatically chooses sorting based on compositor
|
||||
property var sortedToplevels: {
|
||||
@@ -31,12 +32,16 @@ Singleton {
|
||||
return NiriService.sortToplevels(ToplevelManager.toplevels.values)
|
||||
}
|
||||
|
||||
// For non-niri compositors or when niri isn't ready yet, return unsorted toplevels
|
||||
// Use Hyprland sorting when both compositor is Hyprland AND hyprland service is ready
|
||||
if (useHyprlandSorting) {
|
||||
return HyprlandService.sortToplevels(ToplevelManager.toplevels.values)
|
||||
}
|
||||
|
||||
// For other compositors or when services aren't ready yet, return unsorted toplevels
|
||||
return ToplevelManager.toplevels.values
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("CompositorService: Starting detection...")
|
||||
detectCompositor()
|
||||
}
|
||||
|
||||
@@ -46,7 +51,7 @@ Singleton {
|
||||
isHyprland = true
|
||||
isNiri = false
|
||||
compositor = "hyprland"
|
||||
console.log("CompositorService: Detected Hyprland with signature:", hyprlandSignature)
|
||||
console.log("CompositorService: Detected Hyprland")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user