Files
mxandClaude Opus 5.5 eb81d51c07 Preview a workspace live when hovering it in the bar
The bar popout shows the hovered workspace as on its monitor: the
wallpaper and a live capture of each window where it sits. A click on it
switches there. The focused workspace is not previewed. Settings -> Bar
-> Preview on hover turns it off (bar.workspaces.preview).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:01:44 +01:00

307 lines
11 KiB
QML

pragma Singleton
import QtQuick
import Quickshell
Singleton {
// Sidebar groups, in display order.
readonly property var groups: [
{
id: "info",
title: ""
},
{
id: "personalize",
title: "Personalize"
},
{
id: "shell",
title: "Shell"
},
{
id: "system",
title: "System"
}
]
// `keywords` lists setting titles on the page; search results jump to and highlight them.
readonly property var pages: [
{
id: "appearance",
title: "Appearance",
command: "appearance",
description: "Accent, glass and motion",
phase: 5,
available: true,
group: "personalize",
icon: "󰏘",
keywords: ["Accent source", "Custom accent", "Matugen", "Scheme", "Contrast", "Glass tint", "Regenerate on wallpaper change", "Glass opacity", "Panel opacity", "Border opacity", "Corner radius", "Animation duration", "Animation intensity", "Reduced motion", "Shadows", "Glass highlights", "HyprGlass", "Blur", "Refraction", "Vibrancy"]
},
{
id: "wallpaper",
title: "Wallpaper",
command: "wallpaper",
// The launcher command opens the picker itself; the page stays reachable from its cog.
launcherAction: "openWallpaperPicker",
description: "Wallpaper picker and palette generation",
phase: 5,
available: true,
group: "personalize",
icon: "󰸉",
keywords: ["Wallpaper picker", "Apply to monitor", "Backend", "Palette monitor", "Wallpaper folders", "Gallery"]
},
{
id: "widgets",
title: "Desktop widgets",
command: "widgets",
description: "Clocks, system usage, weather and more on the desktop",
phase: 9,
available: true,
group: "personalize",
icon: "󰕰",
keywords: ["Edit widgets", "Add widget", "Snap to grid", "Clock widget", "Calendar", "Weather", "Note", "Visualizer"]
},
{
id: "bar",
title: "Bar",
command: "bar",
description: "Bar modules and tray preferences",
phase: 5,
available: true,
group: "shell",
icon: "󰕮",
keywords: ["Bar height", "Margin", "Modules", "Show date", "24-hour time", "Show seconds", "Workspace count", "Workspace style", "Preview on hover", "Pacman", "Roman numerals", "Kanji", "Clock"]
},
{
id: "notch",
title: "Notch",
command: "notch",
description: "Notch mode: side islands and a pocket-dots style notch instead of the bar",
phase: 9,
available: true,
group: "shell",
icon: "󰹑",
keywords: ["Notch", "Notch mode", "Notch opacity", "Notch colour", "Workspace style", "Glassy when open", "Opening speed", "Closing speed", "Colour change speed", "Open on Media while audio plays", "Pocket-dots", "Left island", "Right island", "Notch strip"]
},
{
id: "tray",
title: "Bar / Tray",
command: "tray",
description: "Tray icons and application menus",
phase: 2,
available: true,
group: "shell",
icon: "󰀻",
keywords: ["System tray", "Hover menus", "Hover delay", "Icon size", "Spacing", "Background"]
},
{
id: "dock",
title: "Dock",
command: "dock",
description: "Pinned apps, visibility and placement",
phase: 3,
available: true,
group: "shell",
icon: "󱂩",
keywords: ["Enable dock", "Monitor", "Position", "Visibility", "Icon size", "Spacing", "Margin", "Magnification", "Magnification strength", "Animation speed", "Show running apps", "Running indicators", "Tooltips", "Terminal launcher", "Pinned applications"]
},
{
id: "launcher",
title: "Launcher",
command: "launcher",
description: "Search and command palette preferences",
phase: 4,
available: true,
group: "shell",
icon: "󰵆",
keywords: ["Width", "Maximum results", "Show descriptions"]
},
{
id: "controlcenter",
title: "Control Center",
command: "controlcenter",
description: "System controls and modules",
phase: 7,
available: true,
group: "shell",
icon: "󰔡",
keywords: ["Panel width", "Modules"]
},
{
id: "dashboard",
title: "Dashboard",
command: "dashboard",
description: "Tabbed dashboard: overview, media, performance and power",
phase: 9,
available: true,
group: "shell",
icon: "󰕮",
keywords: ["Dashboard", "Placement", "Position", "Tab order", "Remember last tab", "Equalizer", "EasyEffects", "Power menu"]
},
{
id: "plugins",
title: "Plugins",
command: "plugins",
description: "Omarchy and Noctalia plugins in the glassMxrph style",
phase: 9,
available: true,
group: "shell",
icon: "󰐱",
keywords: ["Plugins", "Install plugin", "Omarchy", "Noctalia", "Marketplace", "Add to bar", "Remove plugin"]
},
{
id: "osd",
title: "On-screen display",
command: "osd",
description: "Volume and brightness overlay",
phase: 9,
available: true,
group: "shell",
icon: "󰍩",
keywords: ["Animation", "OSD", "Volume overlay", "Show overlay", "Position", "Duration", "Step"]
},
{
id: "media",
title: "Media",
command: "media",
description: "Music widget and player preferences",
phase: 6,
available: true,
group: "shell",
icon: "󰝚",
keywords: ["Album artwork", "Track progress", "Album name", "Visualizer in cards", "Preferred player"]
},
{
id: "metrics",
title: "System Metrics",
command: "metrics",
description: "Sensors, desktop widget and diagnostics",
phase: 8,
available: true,
group: "shell",
icon: "󰓅",
keywords: ["Desktop widget", "Monitor", "Position", "Widget scale", "Sampling interval", "GPU", "Network interface", "Storage paths"]
},
{
id: "displays",
title: "Displays",
command: "display",
description: "Display preferences",
phase: 5,
available: true,
group: "system",
icon: "󰍹",
keywords: ["Brightness", "Backlight device", "Night Light", "Night temperature", "Providers"]
},
{
id: "audio",
title: "Audio",
command: "audio",
description: "Playback and microphone controls",
phase: 7,
available: true,
group: "system",
icon: "󰕾",
keywords: ["Volume", "Microphone", "Output device", "Input device"]
},
{
id: "network",
title: "Network",
command: "network",
description: "Network connections",
phase: 7,
available: true,
group: "system",
icon: "󰖩",
keywords: ["Wi-Fi", "Advanced connections", "VPN"]
},
{
id: "bluetooth",
title: "Bluetooth",
command: "bluetooth",
description: "Bluetooth devices",
phase: 7,
available: true,
group: "system",
icon: "󰂯",
keywords: ["Adapter", "Devices", "Pairing"]
},
{
id: "lock",
title: "Lock screen",
command: "lock",
description: "Glass lock screen and password check",
phase: 9,
available: true,
group: "system",
icon: "󰌾",
keywords: ["Lock now", "Preview lock screen", "Test password", "Backdrop", "Glass", "PAM", "Now Playing on lock screen", "Lock screen dashboard", "Notification previews", "Power buttons"]
},
{
id: "notifications",
title: "Notifications",
command: "notifications",
description: "Notification preferences",
phase: 5,
available: true,
group: "system",
icon: "󰂚",
keywords: ["Do not disturb"]
},
{
id: "power",
title: "Power",
command: "power",
description: "Power preferences",
phase: 7,
available: true,
group: "system",
icon: "󰐥",
keywords: ["Power profile", "Lock command", "Suspend", "Reboot", "Shut down"]
},
{
id: "about",
title: "GlassMxrph",
command: "about",
description: "About glassMxrph, versions and environment",
phase: 1,
available: true,
group: "info",
icon: "󰋽",
image: Qt.resolvedUrl("../assets/glassmxrph-256.png"),
keywords: ["About", "Version", "GlassMxrph"]
}
]
function page(id) {
return pages.find(p => p.id === id || p.command === id) || null;
}
// Page and setting matches for the settings search, best first.
function search(text) {
const query = String(text || "").trim().toLowerCase();
if (!query)
return [];
const results = [];
for (const p of pages) {
const title = p.title.toLowerCase();
if (title.includes(query) || p.description.toLowerCase().includes(query))
results.push({
page: p.id,
title: p.title,
detail: p.description,
icon: p.icon,
setting: "",
rank: title.startsWith(query) ? 0 : 1
});
for (const keyword of p.keywords || [])
if (keyword.toLowerCase().includes(query))
results.push({
page: p.id,
title: keyword,
detail: p.title,
icon: p.icon,
setting: keyword,
rank: keyword.toLowerCase().startsWith(query) ? 2 : 3
});
}
return results.sort((a, b) => a.rank - b.rank).slice(0, 40);
}
}