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:
mxandClaude Opus 5.5 committed 2026-10-07 22:36:17 +02:00
commit 99e64a7713
433 files changed
+57792

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
function luminance(r,g,b) {
const channel=v=>v<=0.04045 ? v/12.92 : Math.pow((v+0.055)/1.055,2.4);
return 0.2126*channel(r)+0.7152*channel(g)+0.0722*channel(b);
}
function contrast(a,b) {return (Math.max(a,b)+0.05)/(Math.min(a,b)+0.05);}
function darkForeground(r,g,b) {const l=luminance(r,g,b);return contrast(l,0)>=contrast(l,1);}
+12
View File
@@ -0,0 +1,12 @@
pragma Singleton
import QtQuick
import Quickshell
// Nerd Font glyphs are optional; callers supply a plain-text fallback.
Singleton {
readonly property string family: {
const families = Qt.fontFamilies();
return families.find(f => f === "Symbols Nerd Font") || families.find(f => /Nerd Font/.test(f) && !/Mono/.test(f)) || families.find(f => /Nerd Font/.test(f)) || "";
}
readonly property bool available: family !== ""
}
+146
View File
@@ -0,0 +1,146 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
import "../services"
Singleton {
id: root
property color accent: "transparent"
property color accentText: "transparent"
property bool available: false
property string error: ""
property string version: ""
property var schemes: []
property int generation: 0
property var pending: null
readonly property bool busy: worker.running || pending !== null
readonly property string palettePath: (Quickshell.env("XDG_STATE_HOME") || Quickshell.env("HOME") + "/.local/state") + "/glassMxrph/palette.json"
readonly property string optionsKey: ConfigService.ready ? JSON.stringify([ConfigService.data.appearance.accentSource, ConfigService.data.matugen.executable, ConfigService.data.matugen.scheme, ConfigService.data.matugen.contrast]) : ""
readonly property string sourcePath: WallpaperService.palettePath
onOptionsKeyChanged: {
generation++;
pending = null;
if (ConfigService.ready && ConfigService.data.appearance.accentSource === "matugen") {
probe();
if (sourcePath)
regenerate();
else
WallpaperService.refresh();
}
}
onSourcePathChanged: if (ConfigService.ready && ConfigService.data.matugen.regenerateOnWallpaperChange)
regenerate()
function probe() {
if (ConfigService.ready)
probeJob.start({
action: "matugen-probe",
executable: ConfigService.data.matugen.executable
});
}
function regenerate() {
if (!ConfigService.ready || ConfigService.data.appearance.accentSource !== "matugen")
return false;
if (!sourcePath) {
error = "Select a wallpaper, then regenerate its palette.";
return false;
}
generation++;
pending = {
action: "palette",
generation: generation,
path: sourcePath,
executable: ConfigService.data.matugen.executable,
scheme: ConfigService.data.matugen.scheme,
contrast: ConfigService.data.matugen.contrast
};
debounce.restart();
return true;
}
function launchPending() {
if (!worker.running && pending) {
const next = pending;
pending = null;
worker.start(next);
}
}
Timer {
id: debounce
interval: 200
onTriggered: root.launchPending()
}
ProviderJob {
id: probeJob
onFinished: (request, result) => {
if (request.executable !== ConfigService.data.matugen.executable) {
Qt.callLater(root.probe);
return;
}
if (result.ok) {
root.version = result.version;
root.schemes = result.schemes;
} else {
root.version = "";
root.schemes = [];
root.error = result.error;
}
}
}
ProviderJob {
id: worker
onFinished: (request, result) => {
if (request.generation === root.generation) {
if (result.ok) {
root.version = result.version;
palette.setText(JSON.stringify(result.palette) + "\n");
root.error = "";
} else
root.error = result.error;
}
Qt.callLater(root.launchPending);
}
}
FileView {
id: palette
path: root.palettePath
watchChanges: true
atomicWrites: true
printErrors: false
onFileChanged: reload()
onSaved: root.loadPalette()
onLoaded: root.loadPalette()
onSaveFailed: error => root.error = "Could not save generated palette (" + error + ")"
}
function loadPalette() {
try {
const data = JSON.parse(palette.text());
if (!/^#[0-9a-fA-F]{6}$/.test(data.accent))
throw Error("Invalid palette accent");
if (data.accentText !== undefined && !/^#[0-9a-fA-F]{6}$/.test(data.accentText))
throw Error("Invalid palette accent text");
root.accent = data.accent;
root.accentText = data.accentText || "transparent";
root.available = true;
root.error = "";
} catch (error) {
root.error = String(error);
}
}
IpcHandler {
target: "theme"
function regenerate(): bool {
return root.regenerate();
}
function status(): string {
return JSON.stringify({
generation: root.generation,
busy: root.busy,
error: root.error,
available: root.available,
version: root.version,
accent: root.accent.toString()
});
}
}
}
+53
View File
@@ -0,0 +1,53 @@
pragma Singleton
import QtQuick
import Quickshell
import "../services"
import "ColorLogic.js" as ColorLogic
Singleton {
id: root
property color accent: ThemeManager.accent
Behavior on accent {
ColorAnimation {
duration: Theme.duration
}
}
readonly property color accentHover: Qt.lighter(accent, 1.12)
// Same hue, lifted so dark accents stay visible as fills on dark glass.
readonly property color accentVivid: accent.hslLightness < 0.5 ? Qt.hsla(accent.hslHue, accent.hslSaturation, 0.6, 1) : accent
readonly property color accentPressed: Qt.darker(accent, 1.12)
readonly property color accentDarkText: "#000000"
readonly property color accentLightText: "#ffffff"
readonly property color accentText: textOn(accent)
readonly property color accentHoverText: textOn(accentHover)
readonly property color accentPressedText: textOn(accentPressed)
function textOn(background) {
const palette = MatugenService.accentText;
const base = ColorLogic.luminance(background.r, background.g, background.b);
if (ThemeManager.source === "matugen" && MatugenService.available && palette.a > 0 && ColorLogic.contrast(base, ColorLogic.luminance(palette.r, palette.g, palette.b)) >= 4.5)
return palette;
return ColorLogic.darkForeground(background.r, background.g, background.b) ? accentDarkText : accentLightText;
}
// Glass tint, like Ghostty's `background`: panels use it at the configured
// opacity, controls and cards are translucent shades of it (never grey overlays).
readonly property color tint: ConfigService.ready && /^#[0-9a-fA-F]{6}$/.test(ConfigService.data.appearance.glassTint) ? ConfigService.data.appearance.glassTint : "#000000"
readonly property color surface: tint
readonly property color surfaceVariant: Qt.alpha(tint, 0.38)
readonly property color fill: Qt.alpha(tint, 0.22)
readonly property color hover: Qt.alpha(text, 0.09)
readonly property color hairline: Qt.alpha(text, 0.08)
readonly property color text: "#f6f6f6"
readonly property color textSecondary: "#bdbdbd"
readonly property color transparent: "transparent"
readonly property color urgent: "#f6b86b"
readonly property color shadow: "#10000000"
readonly property real panelOpacity: ConfigService.ready ? ConfigService.data.appearance.panelOpacity : 0.86
readonly property real intensity: ConfigService.ready ? (ConfigService.data.animation.reducedMotion ? 0 : ConfigService.data.animation.intensity) : 1
readonly property real glassOpacity: ConfigService.ready ? ConfigService.data.appearance.glassOpacity : 0.76
readonly property real borderOpacity: ConfigService.ready ? ConfigService.data.appearance.borderOpacity : 0.18
readonly property real radius: ConfigService.ready ? ConfigService.data.appearance.radius : 22
readonly property color border: Qt.alpha(text, borderOpacity)
readonly property bool highlights: !ConfigService.ready || ConfigService.data.appearance.highlights
readonly property bool shadows: !ConfigService.ready || ConfigService.data.appearance.shadows
readonly property int duration: ConfigService.ready ? (ConfigService.data.animation.reducedMotion ? 0 : ConfigService.data.animation.duration) : 220
}
+10
View File
@@ -0,0 +1,10 @@
pragma Singleton
import QtQuick
import Quickshell
import "../services"
Singleton {
SystemPalette { id: systemPalette; colorGroup: SystemPalette.Active }
readonly property string source: ConfigService.ready ? ConfigService.data.appearance.accentSource : "system"
readonly property color accent: source === "custom" ? ConfigService.data.appearance.customAccent : source === "matugen" && MatugenService.available ? MatugenService.accent : systemPalette.highlight
readonly property string status: source === "matugen" ? (MatugenService.busy ? "Generating wallpaper palette…" : MatugenService.available ? "Wallpaper palette · neutral glass surfaces" : "Waiting for a wallpaper palette; using system accent") : source
}
+4
View File
@@ -0,0 +1,4 @@
singleton MatugenService 1.0 MatugenService.qml
singleton Theme 1.0 Theme.qml
singleton ThemeManager 1.0 ThemeManager.qml
singleton Icons 1.0 Icons.qml