summaryrefslogtreecommitdiffstats
path: root/impatience/settings.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:19:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:19:51 +0000
commitdf7baa2644d541634825e28851c2bd8a47cd5233 (patch)
tree097c499ac161feb4345b18a4f6605e7199d6a635 /impatience/settings.js
parentInitial commit. (diff)
downloadgnome-shell-extension-impatience-upstream.tar.xz
gnome-shell-extension-impatience-upstream.zip
Adding upstream version 0.4.8.upstream/0.4.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'impatience/settings.js')
-rw-r--r--impatience/settings.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/impatience/settings.js b/impatience/settings.js
new file mode 100644
index 0000000..8d59838
--- /dev/null
+++ b/impatience/settings.js
@@ -0,0 +1,17 @@
+const Gio = imports.gi.Gio;
+const ExtensionUtils = imports.misc.extensionUtils;
+const Extension = ExtensionUtils.getCurrentExtension();
+
+const SCHEMA_PATH = 'org.gnome.shell.extensions.net.gfxmonk.impatience';
+
+function Prefs() {
+ var self = this;
+ var settings = this.settings = ExtensionUtils.getSettings(SCHEMA_PATH);
+ this.SPEED = {
+ key: 'speed-factor',
+ get: function() { return settings.get_double(this.key); },
+ set: function(v) { settings.set_double(this.key, v); },
+ changed: function(cb) { return settings.connect('changed::' + this.key, cb); },
+ disconnect: function() { return settings.disconnect.apply(settings, arguments); },
+ };
+};