Skip to content

ToDesktop/todesktop-active-win

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToDesktop Active Win

Get 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. Using ToDesktop Builder, navigate to Plugins. Click on the Explore button for "Active Window" and install the package.

Usage

getActiveWin

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',
	}
	*/
})();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors