/usr/share/gnome-shell/extensions/hidetopbar@mathieu.bidon.ca/prefs.js is in gnome-shell-extension-autohidetopbar 20140113-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | const Gtk = imports.gi.Gtk;
const Gettext = imports.gettext.domain('hidetopbar');
const _ = Gettext.gettext;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
let settings;
function init() {
settings = Convenience.getSettings();
Convenience.initTranslations("hidetopbar");
}
function buildPrefsWidget() {
let frame = new Gtk.VBox({border_width: 10});
frame.pack_start(new Gtk.Label({
label: _("<b>Sensitivity</b>"),
use_markup: true,
xalign: 0
}), false, false, 0);
let settings_vbox = new Gtk.VBox({margin_left: 20, margin_top: 10});
let settings_array = [
['mouse-sensitive',_("Show panel when mouse approaches edge of the screen")],
['hot-corner',_("Keep hot corner sensitive, even in hidden state")],
['mouse-triggers-overview',_("In the above case show overview, too")],
];
settings_array.forEach(function (s) {
let hbox = new Gtk.HBox();
let onoff = new Gtk.Switch({active: settings.get_boolean(s[0])});
hbox.pack_start(new Gtk.Label({
label: s[1],
use_markup: true,
xalign: 0
}), true, true, 0);
hbox.pack_end(onoff, false, false, 0);
settings.connect('changed::'+s[0], function(k,b) {
onoff.set_active(settings.get_boolean(b)); });
onoff.connect('notify::active', function(w) {
settings.set_boolean(s[0], w.active);
});
settings_vbox.pack_start(hbox, false,false, 0);
});
frame.pack_start(settings_vbox, true, true, 0);
let settings_vbox = new Gtk.VBox({margin_left: 20, margin_bottom: 10});
let settings_array = [
['pressure-threshold',_("Pressure barrier's threshold.")],
['pressure-timeout',_("Pressure barrier's timeout.")]
];
settings_array.forEach(function (s) {
let hbox = new Gtk.HBox();
let spin = Gtk.SpinButton.new_with_range(0,10000,1);
spin.set_value(settings.get_int(s[0]));
hbox.pack_start(new Gtk.Label({
label: s[1],
use_markup: true,
xalign: 0
}), true, true, 0);
hbox.pack_end(spin, false, false, 0);
settings.connect('changed::'+s[0], function(k,b) {
spin.set_value(settings.get_int(b)); });
spin.connect('value-changed', function(w) {
settings.set_int(s[0], w.get_value());
});
settings_vbox.pack_start(hbox, false,false, 0);
});
frame.pack_start(settings_vbox, true, true, 0);
frame.pack_start(new Gtk.Label({
label: _("<b>Animation</b>"),
use_markup: true,
xalign: 0
}), false, false, 0);
let settings_vbox = new Gtk.VBox({margin_left: 20, margin_top: 10});
let settings_array = [
['animation-time-overview',_("Slide animation time when entering/leaving overview.")],
['animation-time-autohide',_("Slide animation time when mouse approaches edge of the screen.")]
];
settings_array.forEach(function (s) {
let hbox = new Gtk.HBox();
let spin = Gtk.SpinButton.new_with_range(0.0,1.0,0.1);
spin.set_value(settings.get_double(s[0]));
hbox.pack_start(new Gtk.Label({
label: s[1],
use_markup: true,
xalign: 0
}), true, true, 0);
hbox.pack_end(spin, false, false, 0);
settings.connect('changed::'+s[0], function(k,b) {
spin.set_value(settings.get_double(b)); });
spin.connect('value-changed', function(w) {
settings.set_double(s[0], w.get_value());
});
settings_vbox.pack_start(hbox, false,false, 0);
});
frame.pack_start(settings_vbox, true, true, 0);
frame.show_all();
return frame;
}
|