diff --git a/lib/extension/keybindings.js b/lib/extension/keybindings.js index cd5dba0..0b9de72 100644 --- a/lib/extension/keybindings.js +++ b/lib/extension/keybindings.js @@ -175,6 +175,10 @@ export class Keybindings extends GObject.Object { buildBindingDefinitions() { this._bindings = { + "window-close": () => { + let action = { name: "Close" }; + this.extWm.command(action); + }, "window-toggle-float": () => { let actions = [ { diff --git a/lib/extension/window.js b/lib/extension/window.js index b5e60d5..ee5c3bc 100644 --- a/lib/extension/window.js +++ b/lib/extension/window.js @@ -434,6 +434,12 @@ export class WindowManager extends GObject.Object { let currentLayout; switch (action.name) { + case "Close": + if (focusWindow) { + focusWindow.delete(global.display.get_current_time()); + } + + break; case "FloatNonPersistentToggle": case "FloatToggle": case "FloatClassToggle": diff --git a/schemas/org.gnome.shell.extensions.forge.gschema.xml b/schemas/org.gnome.shell.extensions.forge.gschema.xml index ee42081..4c1ea94 100644 --- a/schemas/org.gnome.shell.extensions.forge.gschema.xml +++ b/schemas/org.gnome.shell.extensions.forge.gschema.xml @@ -197,6 +197,11 @@ Swap window left + + q']]]> + Close window + + j']]]> Swap window down