1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

Initial hyprland workspace support

This commit is contained in:
purian23
2025-08-20 20:01:56 -04:00
parent daaf1ae74c
commit 712b4986be
3 changed files with 262 additions and 32 deletions

View File

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