diff --git a/data/50-gnome-shell-launchers.xml b/data/50-gnome-shell-launchers.xml
index 4a69770c2..1d8b276da 100644
--- a/data/50-gnome-shell-launchers.xml
+++ b/data/50-gnome-shell-launchers.xml
@@ -41,5 +41,41 @@
description="Activate pinned app 9"
hidden="true"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
index d77a7f716..d90a1f61c 100644
--- a/data/org.gnome.shell.gschema.xml.in
+++ b/data/org.gnome.shell.gschema.xml.in
@@ -235,6 +235,42 @@
["<Super>9"]
Switch to application 9
+
+ ["<Super><Control>1"]
+ Open a new instance of application 1
+
+
+ ["<Super><Control>2"]
+ Open a new instance of application 2
+
+
+ ["<Super><Control>3"]
+ Open a new instance of application 3
+
+
+ ["<Super><Control>4"]
+ Open a new instance of application 4
+
+
+ ["<Super><Control>5"]
+ Open a new instance of application 5
+
+
+ ["<Super><Control>6"]
+ Open a new instance of application 6
+
+
+ ["<Super><Control>7"]
+ Open a new instance of application 7
+
+
+ ["<Super><Control>8"]
+ Open a new instance of application 8
+
+
+ ["<Super><Control>9"]
+ Open a new instance of application 9
+
["Print"]
Take a screenshot interactively
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 0cb0788de..6af225f14 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -819,6 +819,60 @@ export class WindowManager {
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
this._switchToApplication.bind(this));
+ this.addKeybinding('open-new-window-application-1',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-2',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-3',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-4',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-5',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-6',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-7',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-8',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-9',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
global.stage.connect('scroll-event', (stage, event) => {
const allowedModes = Shell.ActionMode.NORMAL;
if ((allowedModes & Main.actionMode) === 0)
@@ -1656,19 +1710,30 @@ export class WindowManager {
return Main.sessionMode.hasOverview;
}
- _switchToApplication(display, window, binding) {
+ _getNthFavoriteApp(n) {
if (!this._allowFavoriteShortcuts())
- return;
+ return null;
- let [, , , target] = binding.get_name().split('-');
- let apps = AppFavorites.getAppFavorites().getFavorites();
- let app = apps[target - 1];
+ const apps = AppFavorites.getAppFavorites().getFavorites();
+ return apps[n];
+ }
+
+ _switchToApplication(display, window, binding) {
+ const [, , , target] = binding.get_name().split('-');
+ const app = this._getNthFavoriteApp(target - 1);
if (app) {
Main.overview.hide();
app.activate();
}
}
+ _openNewApplicationWindow(display, window, binding) {
+ const [, , , , target] = binding.get_name().split('-');
+ const app = this._getNthFavoriteApp(target - 1);
+ if (app)
+ app.open_new_window(-1);
+ }
+
_toggleCalendar() {
Main.panel.toggleCalendar();
}