Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
99e64a7713
433 files changed
+57792
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import QtQuick
|
||||
import QtTest
|
||||
import Quickshell.Io
|
||||
import "../core"
|
||||
|
||||
// Test hooks for the dashboard: screenshots, named clicks and key presses.
|
||||
Item {
|
||||
id: root
|
||||
parent: ShellState.dashboardWindow ? ShellState.dashboardWindow.contentItem : null
|
||||
TestCase {
|
||||
id: input
|
||||
name: "DashboardDriver"
|
||||
when: false
|
||||
}
|
||||
function find(name) {
|
||||
return ShellState.dashboardWindow ? input.findChild(ShellState.dashboardWindow.contentItem, name) : null;
|
||||
}
|
||||
IpcHandler {
|
||||
target: "dashboardTest"
|
||||
function screenshot(path: string): bool {
|
||||
const surface = root.find("dashboardSurface");
|
||||
return !!surface && surface.grabToImage(result => result.saveToFile(path));
|
||||
}
|
||||
function click(name: string): bool {
|
||||
const item = root.find(name);
|
||||
if (!item || !item.visible)
|
||||
return false;
|
||||
input.mouseClick(item, item.width / 2, item.height / 2);
|
||||
return true;
|
||||
}
|
||||
function key(key: int): void {
|
||||
input.keyClick(key);
|
||||
}
|
||||
function outside(): void {
|
||||
input.mouseClick(ShellState.dashboardWindow.contentItem, -40, -40);
|
||||
}
|
||||
function settingsClick(name: string): bool {
|
||||
const item = ShellState.settingsWindow ? input.findChild(ShellState.settingsWindow.contentItem, name) : null;
|
||||
if (!item || !item.visible || !item.enabled)
|
||||
return false;
|
||||
// Scroll the settings page so the control is under the pointer.
|
||||
for (let p = item.parent; p; p = p.parent)
|
||||
if (p.contentY !== undefined && p.contentItem && p.contentHeight > p.height)
|
||||
p.contentY = Math.max(0, Math.min(p.contentHeight - p.height, item.mapToItem(p.contentItem, 0, 0).y - p.height / 2));
|
||||
input.wait(60);
|
||||
input.mouseClick(item, item.width / 2, item.height / 2);
|
||||
return true;
|
||||
}
|
||||
function settingsScreenshot(path: string): bool {
|
||||
return !!ShellState.settingsWindow && input.findChild(ShellState.settingsWindow.contentItem, "settingsPageLoader").grabToImage(result => result.saveToFile(path));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user