forked from Shinonome/dots-hyprland
waffles: taskview: show windows
This commit is contained in:
@@ -4,6 +4,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
/**
|
||||
@@ -21,6 +22,30 @@ Singleton {
|
||||
property var monitors: []
|
||||
property var layers: ({})
|
||||
|
||||
// Convenient stuff
|
||||
|
||||
function toplevelsForWorkspace(workspace) {
|
||||
return ToplevelManager.toplevels.values.filter(toplevel => {
|
||||
const address = `0x${toplevel.HyprlandToplevel?.address}`;
|
||||
var win = HyprlandData.windowByAddress[address];
|
||||
return win?.workspace?.id === workspace;
|
||||
})
|
||||
}
|
||||
|
||||
function hyprlandClientsForWorkspace(workspace) {
|
||||
return root.windowList.filter(win => win.workspace.id === workspace);
|
||||
}
|
||||
|
||||
function clientForToplevel(toplevel) {
|
||||
if (!toplevel || !toplevel.HyprlandToplevel) {
|
||||
return null;
|
||||
}
|
||||
const address = `0x${toplevel?.HyprlandToplevel?.address}`;
|
||||
return root.windowByAddress[address];
|
||||
}
|
||||
|
||||
// Internals
|
||||
|
||||
function updateWindowList() {
|
||||
getClients.running = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user