Files
glassMxrph/quickshell/shell.qml
T
mxandClaude Opus 5.5 395de70b26 Add native notifications with OSD-style banners and a Control Center module
glassMxrph now owns org.freedesktop.Notifications. Banners drop out of the
bar like the OSD; Control Center stacks history per app like macOS
Notification Center. Do Not Disturb lives in the shell and falls back to
SwayNC while another daemon holds the bus name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:47:40 +02:00

131 lines
4.2 KiB
QML

//@ pragma UseQApplication
//@ pragma Env QT_QUICK_CONTROLS_STYLE=Basic
import QtQuick
import Quickshell
import Quickshell.Io
import "services"
import "core"
import "theme"
import "bar"
import "settings"
import "menus"
import "dock"
import "launcher"
import "widgets"
import "wallpaper"
import "controlcenter"
import "dashboard"
import "osd"
import "notifications"
import "lock"
import "plugins"
ShellRoot {
readonly property var sharedGlass: GlassService
readonly property var sharedMedia: MediaService
Variants {
model: ConfigService.ready ? Quickshell.screens : []
Bar {}
}
Variants {
// The resolved backend: "auto" falls back to native without an external provider.
model: ConfigService.ready && WallpaperService.backend === "native" ? Quickshell.screens.filter(s=>!!ConfigService.data.wallpaper.byMonitor[s.name]) : []
WallpaperBackground {}
}
DesktopWidgets {}
WallpaperPicker {}
ControlCenter {}
Dashboard {}
PluginHost {}
Osd {}
NotificationPopups {}
Lock {}
Settings {}
Launcher {}
TrayMenus {}
BarPopout {}
Loader {
active: ConfigService.ready && ConfigService.data.dock.enabled
sourceComponent: Component {
Dock {}
}
}
DockContextMenu {}
Loader {
active: Quickshell.env("GLASSMXRPH_METRICS_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/MetricsDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_POLISH_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/PolishDriver.qml") : ""
}
// Test-only input driver; QtTest is not a runtime dependency.
Loader {
active: Quickshell.env("GLASSMXRPH_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/TrayDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_DOCK_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/DockDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_LAUNCHER_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/LauncherDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_PLUGIN_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/PluginDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_DASHBOARD_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/DashboardDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_SETTINGS_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/SettingsDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_MEDIA_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/MediaDriver.qml") : ""
}
Loader {
active: Quickshell.env("GLASSMXRPH_CONTROL_TESTING") === "1"
source: active ? Qt.resolvedUrl("testing/ControlDriver.qml") : ""
}
IpcHandler {
target: "shell"
function settings(): void {
ShellState.toggleSettings();
}
function openSettings(page: string): void {
ShellState.openSettings(page);
}
function close(): void {
ShellState.wallpaperPickerOpen = false;
ShellState.controlCenterOpen = false;
ShellState.dashboardOpen = false;
ShellState.settingsOpen = false;
ShellState.launcherOpen = false;
}
function setPreference(path: string, json: string): bool {
try {
return ConfigService.setValue(path, JSON.parse(json));
} catch (e) {
return false;
}
}
function status(): string {
return JSON.stringify({
ready: ConfigService.ready,
error: ConfigService.error,
accent: Theme.accent.toString(),
settingsOpen: ShellState.settingsOpen,
settingsPage: ShellState.settingsPage,
launcherOpen: ShellState.launcherOpen,
wallpaperPickerOpen: ShellState.wallpaperPickerOpen,
accentSource: ConfigService.ready ? ConfigService.data.appearance.accentSource : "loading"
});
}
}
}