Files
PaperWM/app.js
Tor Hedin Brønner 56708fee15 Super+n: Global new window binding
Add a new window action, bound to Super+n by default. This clashes with the
`focus-active-notification` so we kill it.

Schema change!
2018-01-10 10:00:03 +01:00

19 lines
460 B
JavaScript

/*
Application functionality, like global new window actions etc.
*/
const Shell = imports.gi.Shell;
const Tracker = Shell.WindowTracker.get_default();
function newWindow(metaWindow) {
metaWindow = metaWindow || global.display.focus_window;
let app = Tracker.get_window_app(metaWindow);
if (app.can_open_new_window()) {
let workspaceId = metaWindow.get_workspace().workspace_index;
app.open_new_window(workspaceId);
}
}