diff --git a/src/prefs.js b/src/prefs.js index 18f2af90..cbe48510 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -20,6 +20,7 @@ const PrefsWidget = GObject.registerClass({ 'hacks_level0', 'hacks_level1', 'hacks_level2', + 'blur_applications', ], }, class PrefsWidget extends Gtk.Box { _init(params = {}) { @@ -43,6 +44,9 @@ const PrefsWidget = GObject.registerClass({ // ! blur lockscreen this._blur_lockscreen.set_active(config.BLUR_LOCKSCREEN.get()); + // ! blur applications + this._blur_applications.set_active(config.BLUR_APPLICATIONS.get()); + // ! dash hacks if (config.HACKS_LEVEL.get() == 0) { this._hacks_level0.set_active(true); @@ -89,6 +93,11 @@ const PrefsWidget = GObject.registerClass({ config.BLUR_LOCKSCREEN.set(value); } + blur_applications_toggled(w) { + let is_active = w.get_active(); + config.BLUR_APPLICATIONS.set(value); + } + hacks_level0_toggled(w) { let is_active = w.get_active(); if (is_active) { config.HACKS_LEVEL.set(0) } @@ -113,4 +122,4 @@ function init() { } function buildPrefsWidget() { return new PrefsWidget(); -} \ No newline at end of file +} diff --git a/src/prefs.ui b/src/prefs.ui index 7756f94c..adc6c03c 100644 --- a/src/prefs.ui +++ b/src/prefs.ui @@ -88,7 +88,7 @@ 0 3 - 4 + 5 @@ -114,6 +114,17 @@ + + + overview + 1 + + + 1 + 5 + + + lockscreen @@ -126,13 +137,14 @@ - - overview + + applications (coming soon) 1 - + 0 + 1 - 5 + 7 @@ -142,7 +154,7 @@ vertical 0 - 7 + 8 2 @@ -156,7 +168,7 @@ center 0 - 8 + 9 3 @@ -168,7 +180,7 @@ 1 - 8 + 9 @@ -180,7 +192,7 @@ 1 - 9 + 10 @@ -193,7 +205,18 @@ 1 - 10 + 11 + + + + + + 0 + vertical + + 0 + 12 + 2 diff --git a/src/schemas/gschemas.compiled b/src/schemas/gschemas.compiled index e2677408..a2d62c23 100644 Binary files a/src/schemas/gschemas.compiled and b/src/schemas/gschemas.compiled differ diff --git a/src/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml b/src/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml index e176e03e..932a1486 100644 --- a/src/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml +++ b/src/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml @@ -37,6 +37,12 @@ Boolean, whether to blur lockscreen or not + + + false + Boolean, whether to blur applications that request it or not + + 1 @@ -44,4 +50,4 @@ - \ No newline at end of file + diff --git a/src/settings.js b/src/settings.js index 1e0dd9eb..f5692e5d 100644 --- a/src/settings.js +++ b/src/settings.js @@ -127,6 +127,22 @@ var Prefs = class Prefs { } }; + this.BLUR_APPLICATIONS = { + key: 'blur-applications', + get: function () { + return settings.get_boolean(this.key); + }, + set: function (v) { + settings.set_boolean(this.key, v); + }, + changed: function (cb) { + return settings.connect('changed::' + this.key, cb); + }, + disconnect: function () { + return settings.disconnect.apply(settings, arguments); + } + }; + this.HACKS_LEVEL = { key: 'hacks-level', get: function () { @@ -143,4 +159,4 @@ var Prefs = class Prefs { }, }; } -}; \ No newline at end of file +};