Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sentialx/node-window-manager
Manage windows in Windows, macOS and Linux using Node.js
https://github.com/sentialx/node-window-manager
cpp library linux macos native nodejs swift typescript window-manager windows
Last synced: about 2 months ago
JSON representation
Manage windows in Windows, macOS and Linux using Node.js
- Host: GitHub
- URL: https://github.com/sentialx/node-window-manager
- Owner: sentialx
- License: mit
- Created: 2018-08-20T13:21:58.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-29T04:44:38.000Z (over 1 year ago)
- Last Synced: 2024-04-24T01:20:57.975Z (5 months ago)
- Topics: cpp, library, linux, macos, native, nodejs, swift, typescript, window-manager, windows
- Language: C++
- Homepage:
- Size: 364 KB
- Stars: 385
- Watchers: 9
- Forks: 55
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# node-window-manager
Manage windows in Windows, macOS and ~~Linux~~(WIP)
# Install
To install this package, just run
```bash
$ npm install node-window-manager
```# Quick start
The following example shows how to get the currently focused window's title and hide it.
```javascript
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 });
```# Documentation
The documentation and API references are located in the [`docs`](docs) directory.