import QtQuick import Quickshell import Quickshell.Io import "." Scope { id: root // New surfaces start hidden so this config can run beside Ironbar/Mako until // the parity checklist says it is safe to retire the old companions. property bool diagnosticsVisible: false property bool barVisible: false property bool nativeNotificationsEnabled: false // One theme object is shared across all panels so dark/light changes are // instant and every widget uses the same Nugu semantic palette. Theme { id: nuguTheme } // One command boundary keeps process launching out of widgets and makes later // Hypr config simplification a search-and-replace instead of archaeology. Commands { id: commandBus } IpcHandler { target: "nugu" // Diagnostics IPC gives us a safe visual probe before replacing any live service. function showDiagnostics(): void { root.diagnosticsVisible = true } function hideDiagnostics(): void { root.diagnosticsVisible = false } function toggleDiagnostics(): void { root.diagnosticsVisible = !root.diagnosticsVisible } // Bar IPC lets Hypr binds and verification scripts exercise the Quickshell // bar while Ironbar remains the user's real production bar. function showBar(): void { root.barVisible = true } function hideBar(): void { root.barVisible = false } function toggleBar(): void { root.barVisible = !root.barVisible } function reloadTheme(): void { nuguTheme.reload() } function setThemeMode(mode: string): string { nuguTheme.setMode(mode) return nuguTheme.mode } function themeMode(): string { return nuguTheme.mode } // Native notifications are opt-in while Mako is still live. Tests must stop // Mako first, enable this daemon, then rollback by disabling and restarting Mako. function enableNativeNotifications(): string { root.nativeNotificationsEnabled = true return "enabled" } function disableNativeNotifications(): string { root.nativeNotificationsEnabled = false return "disabled" } function nativeNotificationCount(): int { return notificationLoader.item ? notificationLoader.item.count : 0 } function dismissNativeNotifications(): void { if (notificationLoader.item) notificationLoader.item.dismissAll() } function restoreNativeNotification(): void { if (notificationLoader.item) notificationLoader.item.restoreLast() } // OSD IPC gives Hypr binds a stable replacement target for current // `hyprctl notify` helpers before those binds are migrated. function showOsd(message: string, tone: string): string { return osd.showText(message, tone) } function hideOsd(): void { osd.hide() } function showVolumeOsd(level: string): string { return osd.showText(`Volume ${level}`, "info") } function showBrightnessOsd(level: string): string { return osd.showText(`Brightness ${level}`, "warning") } // Launcher IPC is the future `SUPER+Space` target. It stays opt-in until // desktop-entry filtering, keyboard navigation, and app launch are proven. function openLauncher(query: string): string { return launcher.show(query) } function closeLauncher(): void { launcher.close() } function launcherVisible(): bool { return launcher.open } function launcherMatchCount(): int { return launcher.matchCount() } function launcherFirstMatchName(): string { return launcher.firstMatchName() } // Full clipboard picker IPC replaces `hyprlauncher --dmenu` later while // keeping `cliphist` as the storage backend for safety and parity. function openClipboardPicker(query: string): string { return clipboardPicker.show(query) } function closeClipboardPicker(): void { clipboardPicker.close() } function clipboardPickerVisible(): bool { return clipboardPicker.open } function clipboardPickerMatchCount(): int { return clipboardPicker.matchCount() } function clipboardPickerFirstPreview(): string { return clipboardPicker.firstMatchPreview() } function chooseClipboardIndex(index: int): string { return clipboardPicker.chooseIndex(index) } } Loader { id: notificationLoader active: root.nativeNotificationsEnabled sourceComponent: Component { NotificationDaemon { theme: nuguTheme } } } Osd { id: osd theme: nuguTheme } Launcher { id: launcher theme: nuguTheme } ClipboardPicker { id: clipboardPicker theme: nuguTheme commands: commandBus } // Create one bar per monitor, matching Ironbar's multi-output behavior. Variants { model: Quickshell.screens delegate: Component { Bar { required property var modelData screen: modelData theme: nuguTheme commands: commandBus shown: root.barVisible } } } Diagnostics { visible: root.diagnosticsVisible theme: nuguTheme } }