@todesktop/client-active-win
TypeScript icon, indicating that this package has built-in type declarations

0.14.0 • Public • Published

ToDesktop Client Active Win

This is the repo for the ToDesktop Active Win client.

This is a zero-dependency package for interacting with @todesktop/plugin-active-win. This package exposes a set of functions for getting metadata about the active window.

Installation

Install @todesktop/client-active-win in your client-side application using

$ npm install @todesktop/client-active-win

Installation of the plugin package is also necessary.

Usage

Get metadata about the active window (title, id, bounds, owner, etc).

import { getActiveWin } from "@todesktop/client-active-win";

(async () => {
  console.log(await getActiveWin(options));
  /*
	{
		bounds: {
			x: 720,
			y: 330,
			height: 600,
			width: 800
		},
		id: 7184,
		memoryUsage: 1248,
		owner: {
			name: 'Simple App',
			processId: 56614,
			bundleId: 'com.google.Chrome',
			path: '/Applications/Google Chrome.app'
		},
		platform: "macos",
		title: 'Google',
	}
	*/
})();

Architecture

This package requires the following files:

  • src/index.ts: exposes plugin functionality through strongly-typed, easy-to-use functions.
  • src/generated/plugin.d.ts: automatically generated types from @todesktop/plugin-active-win's index.ts file.

Development

Refer to the root repo for development instructions.

Keywords

none

Install

DownloadsWeekly Downloads

1

Version

0.14.0

License

ISC

Unpacked Size

4.66 kB

Total Files

6

Last publish

Collaborators

  • isaacaderogba
  • megahertz
  • davej