Stats

 Latest version : 2.0.0

 Last updated on 2017-05-09T12:18:55.073Z

 Keywords : cli-app, cli, macos, osx, linux, app, application, window, win, active, focused, current, title, name, id, pid, screenshot, screencapture

 Downloads :

  • 23 in Last Month

 Links :

 Examples

¯\_(ツ)_/¯
No examples found for this package

 Readme

active-win-cli Build Status

Get the title/id/etc of the active window (macOS & Linux)

Install

$ npm install --global active-win-cli

Usage

$ active-win --help

  Usage
    $ active-win [property]

    Returns title, id, app, pid, or the specified property

  Examples
    $ active-win
    npm install
    54
    Terminal
    368
    $ active-win app
    Terminal

Tip

You can use the id property with the builtin screencapture CLI tool to screenshot the active window:

$ screencapture -l$(active-win id) screenshot.png

Related

License

MIT © Sindre Sorhus

 Comments