dash: Open 'Show Apps' with Super+A

This is a workaround for power users for the "Show Apps" button
placement being too inconvenient to press at the bottom of the
dash favorites list.

Unity also uses Super+A to show the Apps lens.

https://bugzilla.gnome.org/show_bug.cgi?id=685738
This commit is contained in:
Jeremy Bicha
2012-10-08 12:16:55 -04:00
committed by Florian Müllner
parent 205773b700
commit dd3484b93f
3 changed files with 23 additions and 0 deletions

View File

@ -1,6 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
@ -19,6 +20,7 @@ const Tweener = imports.ui.tweener;
const Wanda = imports.ui.wanda;
const WorkspacesView = imports.ui.workspacesView;
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
const FocusTrap = new Lang.Class({
Name: 'FocusTrap',
@ -141,6 +143,16 @@ const ViewSelector = new Lang.Class({
// accessing the properties.
this.constrainHeight = new Clutter.BindConstraint({ source: this._pageArea,
coordinate: Clutter.BindCoordinate.HEIGHT });
global.display.add_keybinding('toggle-application-view',
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
Meta.KeyBindingFlags.NONE,
Lang.bind(this, this._showWithAppsPage));
},
_showWithAppsPage: function() {
Main.overview.show();
this._showAppsButton.set_checked(true);
},
show: function() {