Adding upstream version 0.5.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
8946e6e0cd
commit
e49dc72f4e
18 changed files with 279 additions and 0 deletions
15
LICENCE
Normal file
15
LICENCE
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
Copyright (C) 2012 Tim Cuthbertson
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
13
Makefile
Normal file
13
Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
all: schemas zip
|
||||||
|
|
||||||
|
0: phony
|
||||||
|
mkzero-gfxmonk -p impatience -p xdg gnome-shell-impatience.xml
|
||||||
|
|
||||||
|
schemas: phony
|
||||||
|
cd impatience/schemas && glib-compile-schemas .
|
||||||
|
|
||||||
|
zip: phony
|
||||||
|
rm -f impatience@gfxmonk.net.zip
|
||||||
|
cd impatience && zip -r ../impatience@gfxmonk.net.zip *
|
||||||
|
|
||||||
|
.PHONY: phony
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<img src="http://gfxmonk.net/dist/status/project/gnome-shell-impatience.png">
|
||||||
|
|
||||||
|
Speed up builtin gnome-shell animations.
|
||||||
|
|
||||||
|
## Setting speed factor permanently without extension
|
||||||
|
Add environment variable e.g. to `/etc/environment`
|
||||||
|
```
|
||||||
|
GNOME_SHELL_SLOWDOWN_FACTOR=0.4
|
||||||
|
```
|
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.5.2
|
2
all.gup
Normal file
2
all.gup
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!bash -eu
|
||||||
|
gup -u compile
|
2
compile.gup
Normal file
2
compile.gup
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!bash -eu
|
||||||
|
gup -u schemas
|
2
gnome-shell-impatience.dist
Normal file
2
gnome-shell-impatience.dist
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
impatience
|
||||||
|
xdg
|
56
gnome-shell-impatience.xml
Normal file
56
gnome-shell-impatience.xml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<?xml-stylesheet type='text/xsl' href='interface.xsl'?>
|
||||||
|
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface" uri="http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml">
|
||||||
|
<name>gnome-shell-impatience</name>
|
||||||
|
<summary>speed up gnome-shell animations</summary>
|
||||||
|
<publish xmlns="http://gfxmonk.net/dist/0install" mode="default"/>
|
||||||
|
<description>
|
||||||
|
Speed up builtin gnome-shell animations.
|
||||||
|
</description>
|
||||||
|
<group>
|
||||||
|
<command name="run">
|
||||||
|
<runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
|
||||||
|
<arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
|
||||||
|
<arg>--plugin-command</arg>
|
||||||
|
<arg>run</arg>
|
||||||
|
</runner>
|
||||||
|
<requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
|
||||||
|
<version not-before="3.0.2"/>
|
||||||
|
</requires>
|
||||||
|
</command>
|
||||||
|
<environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
|
||||||
|
<implementation id="sha1new=bb15a209852b1e6ff4b12de009fd15461f5980b4" released="2012-04-08" version="0.1">
|
||||||
|
<manifest-digest sha256="e10c2ab5b8fff75b6f8c1cd730d3495d04263239021ca2e61235fb3d4d906b3a"/>
|
||||||
|
<archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.1.tgz" size="1897"/>
|
||||||
|
</implementation>
|
||||||
|
<implementation id="sha1new=3b1999db5b574291bc002288adec56cc339930da" released="2012-04-09" version="0.2">
|
||||||
|
<manifest-digest sha256="4740de8b8cbf3e188910fca2051c18311be7a4e8c671f71859675333e906753c"/>
|
||||||
|
<archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.2.tgz" size="1861"/>
|
||||||
|
</implementation>
|
||||||
|
<implementation id="sha1new=ff95827ded5ec34cd4a099e953971ca8390e1680" released="2012-04-09" version="0.3">
|
||||||
|
<manifest-digest sha256="f948c715acc92c07c6a5eb7cca42ebebfa64f5aa05f016502a68f3a04a0885eb"/>
|
||||||
|
<archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.3.tgz" size="1955"/>
|
||||||
|
</implementation>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<command name="run">
|
||||||
|
<runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
|
||||||
|
<arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
|
||||||
|
<arg>--plugin-command</arg>
|
||||||
|
<arg>run</arg>
|
||||||
|
</runner>
|
||||||
|
<requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
|
||||||
|
<version not-before="3.4"/>
|
||||||
|
</requires>
|
||||||
|
</command>
|
||||||
|
<environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
|
||||||
|
<implementation id="sha1new=78f333fddbc392633cc1856bfdc7334d1428166d" released="2012-05-06" version="0.4">
|
||||||
|
<manifest-digest sha256="851f0c2a3a7a624451ecfa072da568ea052f4e7ceedce42b7a228ff2dbd7cf75"/>
|
||||||
|
<archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.4.tgz" size="2338"/>
|
||||||
|
</implementation>
|
||||||
|
<implementation id="sha1new=7f9b00671675795bfffeb8a99d87df5f2bc8e3ec" released="2012-12-29" version="0.4.1">
|
||||||
|
<manifest-digest sha256="ab60737eb157da8fc343c4e8b52767b8ae8848c9d2bfc820b1993ef66866f1a1"/>
|
||||||
|
<archive href="http://gfxmonk.net/dist/0install/gnome-shell-impatience/gnome-shell-impatience-0.4.1.tgz" size="2348"/>
|
||||||
|
</implementation>
|
||||||
|
</group>
|
||||||
|
</interface>
|
28
gnome-shell-impatience.xml.template
Normal file
28
gnome-shell-impatience.xml.template
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<?xml-stylesheet type='text/xsl' href='interface.xsl'?>
|
||||||
|
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
|
||||||
|
<name>gnome-shell-impatience</name>
|
||||||
|
<summary>speed up gnome-shell animations</summary>
|
||||||
|
<publish xmlns="http://gfxmonk.net/dist/0install" mode="default"/>
|
||||||
|
<description>
|
||||||
|
Speed up builtin gnome-shell animations.
|
||||||
|
</description>
|
||||||
|
<feed-for interface="http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml"/>
|
||||||
|
<group>
|
||||||
|
<command name="run">
|
||||||
|
<runner interface="http://gfxmonk.net/dist/0install/zeroinstall-plugin-manager.xml">
|
||||||
|
<arg>http://gfxmonk.net/dist/0install/gnome-shell.xml</arg>
|
||||||
|
<arg>--plugin-command</arg>
|
||||||
|
<arg>run</arg>
|
||||||
|
</runner>
|
||||||
|
<requires interface="http://gfxmonk.net/dist/0install/gnome-shell.xml">
|
||||||
|
<version not-before="3.4"/>
|
||||||
|
</requires>
|
||||||
|
</command>
|
||||||
|
<environment insert="xdg/data" mode="prepend" name="XDG_DATA_DIRS"/>
|
||||||
|
<implementation version="{version}">
|
||||||
|
<manifest-digest/>
|
||||||
|
<archive href="{archive}"/>
|
||||||
|
</implementation>
|
||||||
|
</group>
|
||||||
|
</interface>
|
52
impatience/extension.js
Normal file
52
impatience/extension.js
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
import St from 'gi://St';
|
||||||
|
const DEFAULT_SPEED = 0.75;
|
||||||
|
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
|
||||||
|
import * as Settings from './settings.js';
|
||||||
|
|
||||||
|
function LOG(m){
|
||||||
|
console.log("[impatience] " + m);
|
||||||
|
};
|
||||||
|
|
||||||
|
var noop = function() {};
|
||||||
|
|
||||||
|
export default class Impatience extends Extension {
|
||||||
|
constructor(metadata) {
|
||||||
|
super(metadata);
|
||||||
|
this.enabled = false;
|
||||||
|
this.original_speed = St.Settings.get().slow_down_factor;
|
||||||
|
this.modified_speed = DEFAULT_SPEED;
|
||||||
|
this.unbind = noop;
|
||||||
|
};
|
||||||
|
|
||||||
|
enable() {
|
||||||
|
this.enabled = true;
|
||||||
|
var pref = (new Settings.Prefs(this)).SPEED;
|
||||||
|
LOG("enabled");
|
||||||
|
var binding = pref.changed(() => {
|
||||||
|
this.set_speed(pref.get());
|
||||||
|
});
|
||||||
|
this.unbind = () => {
|
||||||
|
pref.disconnect(binding);
|
||||||
|
this.unbind = noop;
|
||||||
|
};
|
||||||
|
this.set_speed(pref.get());
|
||||||
|
};
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
this.enabled = false;
|
||||||
|
this.unbind();
|
||||||
|
St.Settings.get().slow_down_factor = this.original_speed;
|
||||||
|
};
|
||||||
|
|
||||||
|
set_speed(new_speed) {
|
||||||
|
if(!this.enabled) {
|
||||||
|
LOG("NOT setting new speed, since the extension is disabled.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(new_speed !== undefined) {
|
||||||
|
this.modified_speed = new_speed;
|
||||||
|
}
|
||||||
|
LOG("setting new speed: " + this.modified_speed);
|
||||||
|
St.Settings.get().slow_down_factor = this.modified_speed;
|
||||||
|
};
|
||||||
|
}
|
12
impatience/metadata.json
Normal file
12
impatience/metadata.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"uuid": "impatience@gfxmonk.net",
|
||||||
|
"name": "Impatience",
|
||||||
|
"description": "Speed up the gnome-shell animation speed",
|
||||||
|
"url": "http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml",
|
||||||
|
"shell-version": [
|
||||||
|
"45",
|
||||||
|
"46",
|
||||||
|
"47"
|
||||||
|
],
|
||||||
|
"settings-schema": "org.gnome.shell.extensions.net.gfxmonk.impatience"
|
||||||
|
}
|
61
impatience/prefs.js
Normal file
61
impatience/prefs.js
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
import Gtk from 'gi://Gtk';
|
||||||
|
|
||||||
|
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
|
||||||
|
import * as Settings from './settings.js';
|
||||||
|
|
||||||
|
export default class ImpatiencePrefs extends ExtensionPreferences {
|
||||||
|
getPreferencesWidget() {
|
||||||
|
let config = new Settings.Prefs(this);
|
||||||
|
let frame = new Gtk.Box({
|
||||||
|
orientation: Gtk.Orientation.VERTICAL,
|
||||||
|
'margin-top': 20,
|
||||||
|
'margin-bottom': 20,
|
||||||
|
'margin-start': 20,
|
||||||
|
'margin-end': 20
|
||||||
|
});
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
let hbox = new Gtk.Box({
|
||||||
|
orientation: Gtk.Orientation.HORIZONTAL,
|
||||||
|
spacing: 20
|
||||||
|
});
|
||||||
|
|
||||||
|
let label = new Gtk.Label({
|
||||||
|
label: "Speed scaling\n<small>(1 = normal, 0.5 = twice as fast)</small>",
|
||||||
|
use_markup: true,
|
||||||
|
});
|
||||||
|
let adjustment = new Gtk.Adjustment({
|
||||||
|
lower: 0,
|
||||||
|
upper: 2,
|
||||||
|
step_increment: 0.05
|
||||||
|
});
|
||||||
|
let scale = new Gtk.Scale({
|
||||||
|
orientation: Gtk.Orientation.HORIZONTAL,
|
||||||
|
digits:2,
|
||||||
|
adjustment: adjustment,
|
||||||
|
hexpand: true,
|
||||||
|
value_pos: Gtk.PositionType.RIGHT
|
||||||
|
});
|
||||||
|
|
||||||
|
hbox.append(label);
|
||||||
|
hbox.append(scale);
|
||||||
|
frame.append(hbox);
|
||||||
|
|
||||||
|
var pref = config.SPEED;
|
||||||
|
scale.set_value(pref.get());
|
||||||
|
[0.25, 0.5, 1.0, 2.0].forEach(
|
||||||
|
mark => scale.add_mark(mark, Gtk.PositionType.TOP, "<small>" + mark + "</small>")
|
||||||
|
);
|
||||||
|
scale.connect('value-changed', function(sw) {
|
||||||
|
var oldval = pref.get();
|
||||||
|
var newval = sw.get_value();
|
||||||
|
if (newval != pref.get()) {
|
||||||
|
pref.set(newval);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
|
frame.show();
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
}
|
BIN
impatience/schemas/gschemas.compiled
Normal file
BIN
impatience/schemas/gschemas.compiled
Normal file
Binary file not shown.
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<schemalist>
|
||||||
|
<schema id="org.gnome.shell.extensions.net.gfxmonk.impatience" path="/org/gnome/shell/extensions/net/gfxmonk/impatience/">
|
||||||
|
<key type="d" name="speed-factor">
|
||||||
|
<default>0.75</default>
|
||||||
|
<summary>speed factor</summary>
|
||||||
|
<description/>
|
||||||
|
</key>
|
||||||
|
</schema>
|
||||||
|
</schemalist>
|
10
impatience/settings.js
Normal file
10
impatience/settings.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
export function Prefs(extension) {
|
||||||
|
var settings = this.settings = extension.getSettings();
|
||||||
|
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); },
|
||||||
|
};
|
||||||
|
};
|
4
schemas.gup
Normal file
4
schemas.gup
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!bash -eu
|
||||||
|
gup --always
|
||||||
|
cd impatience/schemas
|
||||||
|
glib-compile-schemas .
|
1
xdg/data/glib-2.0/schemas
Symbolic link
1
xdg/data/glib-2.0/schemas
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../impatience/schemas
|
1
xdg/data/gnome-shell/extensions/impatience@gfxmonk.net
Symbolic link
1
xdg/data/gnome-shell/extensions/impatience@gfxmonk.net
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../../impatience
|
Loading…
Add table
Add a link
Reference in a new issue