node window manager
2.2.0
Verwalten Sie Fenster in Windows, macOS und Linux (In Bearbeitung)
Um dieses Paket zu installieren, führen Sie es einfach aus
$ npm install node-window-manager
Das folgende Beispiel zeigt, wie Sie den Titel des aktuell fokussierten Fensters abrufen und ausblenden.
const { windowManager } = require ( "node-window-manager" ) ;
const window = windowManager . getActiveWindow ( ) ;
// Prints the currently focused window bounds.
console . log ( window . getBounds ( ) ) ;
// This method has to be called on macOS before changing the window's bounds, otherwise it will throw an error.
// It will prompt an accessibility permission request dialog, if needed.
windowManager . requestAccessibility ( ) ;
// Sets the active window's bounds.
window . setBounds ( { x : 0 , y : 0 } ) ;
Die Dokumentation und API-Referenzen befinden sich im Verzeichnis docs
.