From 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 Mon Sep 17 00:00:00 2001 From: AlexanderCurl Date: Sat, 18 Apr 2026 17:46:06 +0100 Subject: Replaced file structures for themes in the correct format --- .../quickshell/Services/BlurService.qml | 113 --------------------- 1 file changed, 113 deletions(-) delete mode 100644 raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Services/BlurService.qml (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Services/BlurService.qml') diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Services/BlurService.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Services/BlurService.qml deleted file mode 100644 index 40a3aeb..0000000 --- a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Services/BlurService.qml +++ /dev/null @@ -1,113 +0,0 @@ -pragma Singleton -pragma ComponentBehavior: Bound - -import QtQuick -import Quickshell -import Quickshell.Io -import Quickshell.Wayland // ! Import is needed despite what qmlls says -import qs.Common - -Singleton { - id: root - - property bool quickshellSupported: false - property bool compositorSupported: false - property bool available: quickshellSupported && compositorSupported - readonly property bool enabled: available && (SettingsData.blurEnabled ?? false) - - readonly property color borderColor: { - if (!enabled) - return "transparent"; - const opacity = SettingsData.blurBorderOpacity ?? 0.5; - switch (SettingsData.blurBorderColor ?? "outline") { - case "primary": - return Theme.withAlpha(Theme.primary, opacity); - case "secondary": - return Theme.withAlpha(Theme.secondary, opacity); - case "surfaceText": - return Theme.withAlpha(Theme.surfaceText, opacity); - case "custom": - return Theme.withAlpha(SettingsData.blurBorderCustomColor ?? "#ffffff", opacity); - default: - return Theme.withAlpha(Theme.outline, opacity); - } - } - readonly property int borderWidth: enabled ? 1 : 0 - - function hoverColor(baseColor, hoverAlpha) { - if (!enabled) - return baseColor; - return Theme.withAlpha(baseColor, hoverAlpha ?? 0.15); - } - - function createBlurRegion(targetWindow) { - if (!available) - return null; - - try { - const region = Qt.createQmlObject(` - import Quickshell - Region {} - `, targetWindow, "BlurRegion"); - targetWindow.BackgroundEffect.blurRegion = region; - return region; - } catch (e) { - console.warn("BlurService: Failed to create blur region:", e); - return null; - } - } - - function reapplyBlurRegion(targetWindow, region) { - if (!region || !available) - return; - try { - targetWindow.BackgroundEffect.blurRegion = region; - region.changed(); - } catch (e) {} - } - - function destroyBlurRegion(targetWindow, region) { - if (!region) - return; - try { - targetWindow.BackgroundEffect.blurRegion = null; - } catch (e) {} - region.destroy(); - } - - Process { - id: blurProbe - running: false - command: ["dms", "blur", "check"] - - stdout: StdioCollector { - onStreamFinished: { - root.compositorSupported = text.trim() === "supported"; - if (root.compositorSupported) - console.info("BlurService: Compositor supports ext-background-effect-v1"); - else - console.info("BlurService: Compositor does not support ext-background-effect-v1"); - } - } - - onExited: exitCode => { - if (exitCode !== 0) - console.warn("BlurService: blur probe failed with code:", exitCode); - } - } - - Component.onCompleted: { - try { - const test = Qt.createQmlObject(` - import Quickshell - Region { radius: 0 } - `, root, "BlurAvailabilityTest"); - test.destroy(); - quickshellSupported = true; - console.info("BlurService: Quickshell blur support available"); - blurProbe.running = true; - } catch (e) { - console.info("BlurService: BackgroundEffect not available - blur disabled. Requires a newer version of Quickshell."); - } - } -} -- cgit v1.3