0.0.10 • Published 8 years ago

mac-active-window v0.0.10

Weekly downloads
3
License
MIT
Repository
-
Last release
8 years ago

Active Window

  • Find window location
  • Find screen size
  • Resize front most window

Install

npm install --save mac-active-window

Find window location from PID

import * as lib from "mac-active-window";

let pid = 38111;
let location = lib.findActiveWindow(pid);

location.then(rs => {
    let winLocation = rs.location;
    console.log(winLocation.x);
    console.log(winLocation.y);
    console.log(winLocation.width);
    console.log(winLocation.height);
});

Find screen size

import * as lib from "mac-active-window";

let size = lib.findScreenSize();
size.then(rs => {
    console.log(rs.width);
    console.log(rs.height);
});

Resize front most window

import * as lib from "mac-active-window";

lib.resizeFrontMostWindow(500, 300);
0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago