Fix Warnings and implements Systray
This commit is contained in:
@@ -2,12 +2,17 @@ pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
|
||||
Singleton {
|
||||
|
||||
readonly property string hyprlandSignature: Quickshell.env("HYPRLAND_INSTANCE_SIGNATURE")
|
||||
|
||||
property var sortedTopLevels: {
|
||||
if (!ToplevelManager.toplevels || !ToplevelManager.toplevels.values) {
|
||||
return []
|
||||
}
|
||||
|
||||
const topLevels = Array.from(Hyprland.toplevels.values)
|
||||
const sortedHyprland = topLevels.sort((a, b) => {
|
||||
if (a.monitor && b.monitor) {
|
||||
@@ -50,7 +55,7 @@ Singleton {
|
||||
|
||||
return 0
|
||||
})
|
||||
return sortedHyprland
|
||||
return sortedHyprland.filter(tl => tl.wayland !== null)
|
||||
|
||||
}
|
||||
|
||||
@@ -59,8 +64,10 @@ Singleton {
|
||||
}
|
||||
|
||||
property var sortedDesktopApplications: {
|
||||
const desktopEntries = sortedTopLevels.map( topLevel => {
|
||||
return DesktopEntries.heuristicLookup(topLevel.wayland.appId)
|
||||
const sortedWayland = sortedTopLevels.map(topLevel => topLevel.wayland).filter(wayland=> wayland !== null)
|
||||
|
||||
const desktopEntries = sortedWayland.map( topLevel => {
|
||||
return DesktopEntries.heuristicLookup(topLevel.appId)
|
||||
})
|
||||
const workspace = sortedTopLevels.map( topLevel => {
|
||||
return topLevel.workspace.id
|
||||
|
||||
Reference in New Issue
Block a user