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,22 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import "../../../../core" as Core
|
||||
import "../../../../services" as GS
|
||||
|
||||
// glassMxrph stand-in: the bar is glassMxrph's own top bar.
|
||||
Singleton {
|
||||
readonly property bool isVisible: true
|
||||
property int widgetsRevision: 0
|
||||
function getTooltipDirection(screenName) {
|
||||
return "bottom";
|
||||
}
|
||||
function getPillDirection(widgetInstance) {
|
||||
return !widgetInstance || widgetInstance.section !== "left";
|
||||
}
|
||||
// Plugin settings live in Settings → Plugins.
|
||||
function openPluginSettings(screen, pluginManifest) {
|
||||
GS.PluginService.focusedSettings = pluginManifest && pluginManifest.id ? pluginManifest.id : "";
|
||||
Core.ShellState.openSettings("plugins");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// glassMxrph stand-in: Noctalia's built-in widget registry is not used.
|
||||
Singleton {
|
||||
property var widgets: ({})
|
||||
property var widgetMetadata: ({})
|
||||
property bool editMode: false
|
||||
function hasWidget(id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// glassMxrph stand-in: Noctalia's built-in widget registry is not used.
|
||||
Singleton {
|
||||
property var widgets: ({})
|
||||
property var widgetMetadata: ({})
|
||||
property bool editMode: false
|
||||
function hasWidget(id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// glassMxrph stand-in: Noctalia's built-in widget registry is not used.
|
||||
Singleton {
|
||||
property var widgets: ({})
|
||||
property var widgetMetadata: ({})
|
||||
property bool editMode: false
|
||||
function hasWidget(id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// glassMxrph stand-in: Noctalia's built-in widget registry is not used.
|
||||
Singleton {
|
||||
property var widgets: ({})
|
||||
property var widgetMetadata: ({})
|
||||
property bool editMode: false
|
||||
function hasWidget(id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import "../../../../core" as Core
|
||||
|
||||
// glassMxrph stand-in: context menus open where the plugin asks and close on
|
||||
// an outside click (Hyprland focus grab); launcher calls use glassMxrph's.
|
||||
Singleton {
|
||||
id: root
|
||||
property var openedPanel: null
|
||||
property var lockScreen: null
|
||||
property bool isKeybindRecording: false
|
||||
property var menu: null
|
||||
|
||||
function showContextMenu(contextMenu, anchorItem, screen, targetItem) {
|
||||
if (!contextMenu || !anchorItem)
|
||||
return;
|
||||
closeContextMenu(screen);
|
||||
menu = contextMenu;
|
||||
contextMenu.openAtItem(anchorItem, screen, targetItem);
|
||||
Qt.callLater(() => grab.active = !!root.menu);
|
||||
}
|
||||
function closeContextMenu(screen) {
|
||||
grab.active = false;
|
||||
if (menu && typeof menu.close === "function")
|
||||
menu.close();
|
||||
menu = null;
|
||||
}
|
||||
function getPopupMenuWindow(screen) {
|
||||
return null;
|
||||
}
|
||||
function getPanel(name, screen) {
|
||||
return null;
|
||||
}
|
||||
function isLauncherOpen() {
|
||||
return Core.ShellState.launcherOpen;
|
||||
}
|
||||
function closeLauncher() {
|
||||
Core.ShellState.launcherOpen = false;
|
||||
}
|
||||
function openLauncherWithSearch(text) {
|
||||
Core.ShellState.openLauncher();
|
||||
}
|
||||
function setLauncherSearchText(text) {
|
||||
}
|
||||
function getLauncherSearchText() {
|
||||
return "";
|
||||
}
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: root.menu ? [root.menu] : []
|
||||
onCleared: root.closeContextMenu(null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// glassMxrph stand-in: Noctalia toasts become desktop notifications.
|
||||
Singleton {
|
||||
function notify(urgency, title, description, duration) {
|
||||
Quickshell.execDetached(["notify-send", "-a", "glassMxrph", "-u", urgency, "-t", String(duration || 4000), String(title || ""), String(description || "")]);
|
||||
}
|
||||
function showNotice(title, description = "", icon = "", duration = 3000, actionLabel = "", actionCallback = null) {
|
||||
notify("low", title, description, duration);
|
||||
}
|
||||
function showInfo(title, description = "", icon = "", duration = 3000) {
|
||||
notify("low", title, description, duration);
|
||||
}
|
||||
function showWarning(title, description = "", duration = 4000, actionLabel = "", actionCallback = null) {
|
||||
notify("normal", title, description, duration);
|
||||
}
|
||||
function showError(title, description = "", duration = 6000, actionLabel = "", actionCallback = null) {
|
||||
notify("critical", title, description, duration);
|
||||
}
|
||||
function dismissToast() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import "../../../../core" as Core
|
||||
import "../../../../services" as GS
|
||||
|
||||
// glassMxrph stand-in: tooltips of bar widgets use the shell's hover popout
|
||||
// (it hangs from the bar); tooltips elsewhere are not shown.
|
||||
Singleton {
|
||||
id: root
|
||||
property var current: null
|
||||
function inBar(target) {
|
||||
const w = target && target.QsWindow ? target.QsWindow.window : null;
|
||||
return !!w && GS.TrayService.barWindows.includes(w);
|
||||
}
|
||||
function show(target, content, direction, delay, fontFamily) {
|
||||
if (!target || !content || !inBar(target))
|
||||
return;
|
||||
current = target;
|
||||
Core.PopoutState.hover(target, "tooltip", String(content));
|
||||
}
|
||||
function hide(target) {
|
||||
if (target && current !== target)
|
||||
return;
|
||||
if (current)
|
||||
Core.PopoutState.unhover(current);
|
||||
current = null;
|
||||
}
|
||||
function hideImmediately() {
|
||||
current = null;
|
||||
Core.PopoutState.close();
|
||||
}
|
||||
function updateContent(newContent) {
|
||||
updateText(newContent);
|
||||
}
|
||||
function updateText(newText) {
|
||||
if (current && Core.PopoutState.anchor === current)
|
||||
Core.PopoutState.text = String(newText);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import "../../../../services" as GS
|
||||
|
||||
// glassMxrph stand-in for wallpaper queries.
|
||||
Singleton {
|
||||
readonly property bool isInitialized: true
|
||||
readonly property var currentWallpapers: GS.ConfigService.ready ? GS.ConfigService.data.wallpaper.byMonitor : ({})
|
||||
signal wallpaperProcessingComplete
|
||||
function getWallpaper(screenName) {
|
||||
return currentWallpapers[screenName] || "";
|
||||
}
|
||||
function getWallpapersEffectiveMap() {
|
||||
return currentWallpapers;
|
||||
}
|
||||
function changeWallpaper(path, screenName) {
|
||||
GS.WallpaperService.apply(path);
|
||||
}
|
||||
function isSolidColorPath(path) {
|
||||
return String(path).startsWith("solid://");
|
||||
}
|
||||
function getSolidColor(path) {
|
||||
return String(path).replace("solid://", "");
|
||||
}
|
||||
function getFillModeUniform() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user