Codebase list gnome-shell-extension-impatience / db38d0e
New upstream snapshot Jonathan Carter 2 years ago
22 changed file(s) with 326 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
0 Copyright (C) 2012 Tim Cuthbertson
1
2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation, either version 3 of the License, or
5 (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14
0 all: schemas zip
1
2 0: phony
3 mkzero-gfxmonk -p impatience -p xdg gnome-shell-impatience.xml
4
5 schemas: phony
6 cd impatience/schemas && glib-compile-schemas .
7
8 zip: phony
9 rm impatience@gfxmonk.net.zip
10 cd impatience && zip -r ../impatience@gfxmonk.net.zip *
11
12 .PHONY: phony
0 <img src="http://gfxmonk.net/dist/status/project/gnome-shell-impatience.png">
1
2 Speed up builtin gnome-shell animations.
0 0.4.5
0 #!bash -eu
1 gup -u compile
0 #!bash -eu
1 gup -u schemas
0 gnome-shell-extension-impatience (0.4.5-5) UNRELEASED; urgency=medium
0 gnome-shell-extension-impatience (0.4.5+git20210412-e8e132f-1) unstable; urgency=medium
11
2 [ Debian Janitor ]
23 * Trim trailing whitespace.
34 * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
45 Repository-Browse.
56
6 -- Debian Janitor <janitor@jelmer.uk> Tue, 03 Mar 2020 15:16:03 +0000
7 [ Jonathan Carter ]
8 * New upstream snapshot (Closes: #993190)
9 * Update standards version to 4.6.1
10 * Upgrade to debhelper-compat to level 13
11 * Declare Rules-Requires-Root: no
12 * Update copyright years
13 * Remove patch for GNOME 3.34 that's no longer needed
14
15 -- Jonathan Carter <jcc@debian.org> Thu, 02 Sep 2021 18:06:05 +0200
716
817 gnome-shell-extension-impatience (0.4.5-4) unstable; urgency=medium
918
11 Section: gnome
22 Priority: optional
33 Maintainer: Jonathan Carter <jcc@debian.org>
4 Build-Depends: debhelper-compat (=12), libglib2.0-bin
5 Standards-Version: 4.5.0
4 Build-Depends: debhelper-compat (=13), libglib2.0-bin
5 Standards-Version: 4.6.1
66 Homepage: https://github.com/timbertson/gnome-shell-impatience
77 Vcs-Git: https://salsa.debian.org/gnome-team/shell-extensions/gnome-shell-extension-impatience.git
88 Vcs-Browser: https://salsa.debian.org/gnome-team/shell-extensions/gnome-shell-extension-impatience
9 Rules-Requires-Root: no
910
1011 Package: gnome-shell-extension-impatience
1112 Architecture: all
22 Source: https://github.com/timbertson/gnome-shell-impatience
33
44 Files: *
5 Copyright: 2012-2017 Tim Cuthbertson <tim@gfxmonk.net>
5 Copyright: 2012-2021 Tim Cuthbertson <tim@gfxmonk.net>
66 License: GPL-3+
77
88 Files: debian/*
9 Copyright: 2016-2020 Jonathan Carter <jcc@debian.org>
9 Copyright: 2016-2021 Jonathan Carter <jcc@debian.org>
1010 License: GPL-3+
1111
1212 License: GPL-3+
0 gnome-shell-extension-impatience_0.4.5+git20210412-e8e132f-1_source.buildinfo gnome optional
0 <?xml version="1.0"?>
1 <?xml-stylesheet type='text/xsl' href='interface.xsl'?>
2 <interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface" uri="http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml">
3 <name>gnome-shell-impatience</name>
4 <summary>speed up gnome-shell animations</summary>
5 <publish xmlns="http://gfxmonk.net/dist/0install" mode="default"/>
6 <description>
7 Speed up builtin gnome-shell animations.
8 </description>
9 <group>
10 <command name="run">
11 <runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
12 <arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
13 <arg>--plugin-command</arg>
14 <arg>run</arg>
15 </runner>
16 <requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
17 <version not-before="3.0.2"/>
18 </requires>
19 </command>
20 <environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
21 <implementation id="sha1new=bb15a209852b1e6ff4b12de009fd15461f5980b4" released="2012-04-08" version="0.1">
22 <manifest-digest sha256="e10c2ab5b8fff75b6f8c1cd730d3495d04263239021ca2e61235fb3d4d906b3a"/>
23 <archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.1.tgz" size="1897"/>
24 </implementation>
25 <implementation id="sha1new=3b1999db5b574291bc002288adec56cc339930da" released="2012-04-09" version="0.2">
26 <manifest-digest sha256="4740de8b8cbf3e188910fca2051c18311be7a4e8c671f71859675333e906753c"/>
27 <archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.2.tgz" size="1861"/>
28 </implementation>
29 <implementation id="sha1new=ff95827ded5ec34cd4a099e953971ca8390e1680" released="2012-04-09" version="0.3">
30 <manifest-digest sha256="f948c715acc92c07c6a5eb7cca42ebebfa64f5aa05f016502a68f3a04a0885eb"/>
31 <archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.3.tgz" size="1955"/>
32 </implementation>
33 </group>
34 <group>
35 <command name="run">
36 <runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
37 <arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
38 <arg>--plugin-command</arg>
39 <arg>run</arg>
40 </runner>
41 <requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
42 <version not-before="3.4"/>
43 </requires>
44 </command>
45 <environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
46 <implementation id="sha1new=78f333fddbc392633cc1856bfdc7334d1428166d" released="2012-05-06" version="0.4">
47 <manifest-digest sha256="851f0c2a3a7a624451ecfa072da568ea052f4e7ceedce42b7a228ff2dbd7cf75"/>
48 <archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.4.tgz" size="2338"/>
49 </implementation>
50 <implementation id="sha1new=7f9b00671675795bfffeb8a99d87df5f2bc8e3ec" released="2012-12-29" version="0.4.1">
51 <manifest-digest sha256="ab60737eb157da8fc343c4e8b52767b8ae8848c9d2bfc820b1993ef66866f1a1"/>
52 <archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.4.1.tgz" size="2348"/>
53 </implementation>
54 </group>
55 </interface>
0 <?xml version="1.0"?>
1 <?xml-stylesheet type='text/xsl' href='interface.xsl'?>
2 <interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
3 <name>gnome-shell-impatience</name>
4 <summary>speed up gnome-shell animations</summary>
5 <publish xmlns="http://gfxmonk.net/dist/0install" mode="default"/>
6 <description>
7 Speed up builtin gnome-shell animations.
8 </description>
9 <feed-for interface="http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml"/>
10 <group>
11 <command name="run">
12 <runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
13 <arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
14 <arg>--plugin-command</arg>
15 <arg>run</arg>
16 </runner>
17 <requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
18 <version not-before="3.4"/>
19 </requires>
20 </command>
21 <environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
22 <implementation version="{version}">
23 <manifest-digest/>
24 <archive href="{archive}"/>
25 </implementation>
26 </group>
27 </interface>
0 const St = imports.gi.St;
1 const Gio = imports.gi.Gio;
2 const Lang = imports.lang;
3 const DEFAULT_SPEED = 0.75;
4 const ExtensionUtils = imports.misc.extensionUtils;
5 const Extension = ExtensionUtils.getCurrentExtension();
6 const Settings = Extension.imports.settings;
7
8 function LOG(m){
9 global.log("[impatience] " + m);
10 log("[impatience] " + m);
11 };
12 function Ext() {
13 this._init.apply(this, arguments);
14 };
15 var noop = function() {};
16
17 Ext.prototype = {};
18 Ext.prototype._init = function() {
19 this.enabled = false;
20 this.original_speed = St.get_slow_down_factor();
21 this.modified_speed = DEFAULT_SPEED;
22 this.unbind = noop;
23 };
24
25 Ext.prototype.enable = function() {
26 this.enabled = true;
27 var pref = (new Settings.Prefs()).SPEED;
28 LOG("enabled");
29 var binding = pref.changed(Lang.bind(this, function() {
30 this.set_speed(pref.get());
31 }));
32 this.unbind = function() {
33 pref.disconnect(binding);
34 this.unbind = noop;
35 };
36 this.set_speed(pref.get());
37 };
38
39 Ext.prototype.disable = function() {
40 this.enabled = false;
41 this.unbind();
42 St.set_slow_down_factor(this.original_speed);
43 };
44
45 Ext.prototype.set_speed = function(new_speed) {
46 if(!this.enabled) {
47 LOG("NOT setting new speed, since the extension is disabled.");
48 return;
49 }
50 if(new_speed !== undefined) {
51 this.modified_speed = new_speed;
52 }
53 LOG("setting new speed: " + this.modified_speed);
54 St.set_slow_down_factor(this.modified_speed);
55 };
56
57 function init() {
58 return new Ext();
59 };
60
0 {
1 "uuid": "impatience@gfxmonk.net",
2 "name": "Impatience",
3 "description": "Speed up the gnome-shell animation speed",
4 "url": "http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml",
5 "shell-version": [ "40" ]
6 }
0 const Gtk = imports.gi.Gtk;
1
2 let Extension = imports.misc.extensionUtils.getCurrentExtension();
3 let Settings = Extension.imports.settings;
4
5 function init() {
6 }
7
8 function buildPrefsWidget() {
9 let config = new Settings.Prefs();
10 let frame = new Gtk.Box({
11 orientation: Gtk.Orientation.VERTICAL,
12 'margin-top': 20,
13 'margin-bottom': 20,
14 'margin-start': 20,
15 'margin-end': 20
16 });
17
18 (function() {
19 let hbox = new Gtk.Box({
20 orientation: Gtk.Orientation.HORIZONTAL,
21 spacing: 20
22 });
23
24 let label = new Gtk.Label({
25 label: "Speed scaling\n<small>(1 = normal, 0.5 = twice as fast)</small>",
26 use_markup: true,
27 });
28 let adjustment = new Gtk.Adjustment({
29 lower: 0,
30 upper: 2,
31 step_increment: 0.05
32 });
33 let scale = new Gtk.Scale({
34 orientation: Gtk.Orientation.HORIZONTAL,
35 digits:2,
36 adjustment: adjustment,
37 hexpand: true,
38 value_pos: Gtk.PositionType.RIGHT
39 });
40
41 hbox.append(label);
42 hbox.append(scale);
43 frame.append(hbox);
44
45 var pref = config.SPEED;
46 scale.set_value(pref.get());
47 [0.25, 0.5, 1.0, 2.0].forEach(
48 mark => scale.add_mark(mark, Gtk.PositionType.TOP, "<small>" + mark + "</small>")
49 );
50 scale.connect('value-changed', function(sw) {
51 var oldval = pref.get();
52 var newval = sw.get_value();
53 if (newval != pref.get()) {
54 pref.set(newval);
55 }
56 });
57 })();
58
59 frame.show();
60 return frame;
61 }
0 <?xml version="1.0" encoding="UTF-8"?>
1 <schemalist>
2 <schema id="org.gnome.shell.extensions.net.gfxmonk.impatience" path="/org/gnome/shell/extensions/net/gfxmonk/impatience/">
3 <key type="d" name="speed-factor">
4 <default>0.75</default>
5 <summary>speed factor</summary>
6 <description/>
7 </key>
8 </schema>
9 </schemalist>
0 const Gio = imports.gi.Gio;
1 const ExtensionUtils = imports.misc.extensionUtils;
2 const Extension = ExtensionUtils.getCurrentExtension();
3
4 const SCHEMA_PATH = 'org.gnome.shell.extensions.net.gfxmonk.impatience';
5
6 function get_local_gsettings(schema_path) {
7 const GioSSS = Gio.SettingsSchemaSource;
8
9 let schemaDir = Extension.dir.get_child('schemas');
10
11 let schemaSource = GioSSS.get_default();
12 if (schemaDir.query_exists(null)) {
13 schemaSource = GioSSS.new_from_directory(
14 schemaDir.get_path(),
15 schemaSource,
16 false);
17 }
18
19 let schemaObj = schemaSource.lookup(schema_path, true);
20 if (!schemaObj) {
21 throw new Error(
22 'Schema ' + schema_path +
23 ' could not be found for extension ' +
24 Extension.metadata.uuid
25 );
26 }
27 return new Gio.Settings({ settings_schema: schemaObj });
28 };
29
30 function Prefs() {
31 var self = this;
32 var settings = this.settings = get_local_gsettings(SCHEMA_PATH);
33 this.SPEED = {
34 key: 'speed-factor',
35 get: function() { return settings.get_double(this.key); },
36 set: function(v) { settings.set_double(this.key, v); },
37 changed: function(cb) { return settings.connect('changed::' + this.key, cb); },
38 disconnect: function() { return settings.disconnect.apply(settings, arguments); },
39 };
40 };
0 #!bash -eu
1 gup --always
2 cd impatience/schemas
3 glib-compile-schemas .
0 ../../../impatience/schemas