summaryrefslogtreecommitdiff
path: root/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js
diff options
context:
space:
mode:
authorAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
committerAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
commit70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch)
treeab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js
parent5d94c0a7d44a2255b81815a52a7056a94a39842d (diff)
downloadRaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz
RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js')
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js
new file mode 100644
index 0000000..556ffa4
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js
@@ -0,0 +1,43 @@
+import GObject from 'gi://GObject';
+
+import * as utils from '../conveniences/utils.js';
+const St = await utils.import_in_shell_only('gi://St');
+const Shell = await utils.import_in_shell_only('gi://Shell');
+
+const DEFAULT_PARAMS = {
+ unscaled_radius: 30, brightness: 0.6
+};
+
+
+export const NativeDynamicBlurEffect = utils.IS_IN_PREFERENCES ?
+ { default_params: DEFAULT_PARAMS } :
+ new GObject.registerClass({
+ GTypeName: "NativeDynamicBlurEffect"
+ }, class NativeDynamicBlurEffect extends Shell.BlurEffect {
+ constructor(params) {
+ const { unscaled_radius, brightness, ...parent_params } = params;
+ super({ ...parent_params, mode: Shell.BlurMode.BACKGROUND });
+
+ this._theme_context = St.ThemeContext.get_for_stage(global.stage);
+ this._theme_context.connectObject(
+ 'notify::scale-factor',
+ _ => this.radius = this.unscaled_radius * this._theme_context.scale_factor,
+ this
+ );
+
+ utils.setup_params(this, params);
+ }
+
+ static get default_params() {
+ return DEFAULT_PARAMS;
+ }
+
+ get unscaled_radius() {
+ return this._unscaled_radius;
+ }
+
+ set unscaled_radius(value) {
+ this._unscaled_radius = value;
+ this.radius = value * this._theme_context.scale_factor;
+ }
+ }); \ No newline at end of file