mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-07-19 15:20:00 +00:00
Add a new window action, bound to Super+n by default. This clashes with the `focus-active-notification` so we kill it. Schema change!
19 lines
460 B
JavaScript
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);
|
|
}
|
|
|
|
}
|
|
|
|
|