node window manager
2.2.0
Kelola jendela di Windows, macOS dan Linux (WIP)
Untuk menginstal paket ini, jalankan saja
$ npm install node-window-manager
Contoh berikut menunjukkan cara mendapatkan judul jendela yang sedang difokuskan dan menyembunyikannya.
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 } ) ;
Dokumentasi dan referensi API terletak di direktori docs
.