{"id":19475486,"url":"https://github.com/artdecocode/window-info","last_synced_at":"2025-08-31T01:37:29.681Z","repository":{"id":135405804,"uuid":"134959655","full_name":"artdecocode/window-info","owner":"artdecocode","description":"Window Info is a readable stream that pushes data about windows on screen on MacOS.","archived":false,"fork":false,"pushed_at":"2018-06-30T19:54:16.000Z","size":75,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T19:16:00.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://artdeco.bz/window-info","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artdecocode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-26T12:31:33.000Z","updated_at":"2023-05-31T06:51:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddf58b0f-2b7a-4cf0-b05d-dc9d913e2394","html_url":"https://github.com/artdecocode/window-info","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/artdecocode/window-info","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fwindow-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fwindow-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fwindow-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fwindow-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artdecocode","download_url":"https://codeload.github.com/artdecocode/window-info/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artdecocode%2Fwindow-info/sbom","scorecard":{"id":208921,"data":{"date":"2025-08-11","repo":{"name":"github.com/artdecocode/window-info","commit":"7b99ada5ca78ce562acf18ffd45723eccb06bc8b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T00:21:26.967Z","repository_id":135405804,"created_at":"2025-08-17T00:21:26.968Z","updated_at":"2025-08-17T00:21:26.968Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272930000,"owners_count":25017057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T19:33:10.565Z","updated_at":"2025-08-31T01:37:29.644Z","avatar_url":"https://github.com/artdecocode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# window-info\n\n[![npm version](https://badge.fury.io/js/window-info.svg)](https://npmjs.org/package/window-info)\n\n`window-info` is a readable stream that pushes data about windows on screen on MacOS.\n\nIt opens a Python process which uses `Quartz` library to get information about windows.\n\n```sh\nyarn add -E window-info\n```\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [API](#api)\n  * [`WindowInfo` Stream](#windowinfo-stream)\n    * [`constructor(delay?: number = 1000): WindowInfo`](#constructordelay-number--1000-windowinfo)\n    * [`destroy(): void`](#destroy-void)\n  * [`Data` Type](#data-type)\n    * [\u003ccode\u003ewinid\u003c/code\u003e](#winid)\n    * [\u003ccode\u003eApp Name\u003c/code\u003e](#app-name)\n    * [\u003ccode\u003eWindow Title\u003c/code\u003e](#window-title)\n    * [\u003ccode\u003epid\u003c/code\u003e](#pid)\n\n## API\n\nThe default exported class is `WindowInfo` which is a Readable stream.\n\n```js\nimport WindowInfo from 'window-info'\n```\n\n### `WindowInfo` Stream\n\n`WindowInfo` is a Readable stream open in object mode with high watermark set to 0 to prevent caching of window data when receiving streams haven't processed previous data. This ensures that the newer data is always as fresh as possible. The presence of the delay value ensures that no data is written before the delay has passed since last write.\n\n\n#### `constructor(`\u003cbr/\u003e\u0026nbsp;\u0026nbsp;`delay?: number = 1000,`\u003cbr/\u003e`): WindowInfo`\n\nCreate a new stream. The `delay` argument controls how often to query data.\n\n```javascript\nimport { Transform } from 'stream'\nimport WindowInfo from 'window-info'\n\n(async () =\u003e {\n  const wi = new WindowInfo({\n    delay: 1000,\n  })\n  let receivedData = 0\n  const limit = 1\n  wi\n    .pipe(new Transform({\n      transform(data, enc, next) {\n        if (receivedData \u003c limit) {\n          this.push(data)\n        } else {\n          // limit reached\n          wi.destroy()\n        }\n        receivedData++\n        next()\n      },\n      objectMode: true,\n      highWaterMark: 0, // disable receiving buffering\n    }))\n    .pipe(new Transform({\n      transform(data, enc, next) {\n        this.push(JSON.stringify([\n          ['winid', 'App Name', 'Window Title', 'pid'],\n          ...data,\n        ]))\n        next()\n      },\n      writableObjectMode: true,\n    }))\n    .pipe(process.stdout)\n})()\n```\n\n| winid | App Name | Window Title | pid |\n| ----- | -------- | ------------ | --- |\n| 33 | SystemUIServer | AppleClockExtra | 386 |\n| 73 | Avira | Item-0 | 501 |\n| 60 | PostgresMenuHelper | Item-0 | 525 |\n| 51 | Little Snitch Agent | Item-0 | 348 |\n| 20 | SystemUIServer | AppleBluetoothExtra | 386 |\n| 24 | SystemUIServer | AirPortExtra | 386 |\n| 29 | SystemUIServer | AppleTextInputExtra | 386 |\n| 37 | SystemUIServer | AppleUser | 386 |\n| 45 | Spotlight | Item-0 | 405 |\n| 18 | SystemUIServer | Siri | 386 |\n| 16 | SystemUIServer | NotificationCenter | 386 |\n| 3 | Window Server | Menubar | 177 |\n| 4292 | Visual Studio Code | 2-fork.md — window-info | 367 |\n| 4291 | Visual Studio Code | package.json — documentary | 367 |\n| 4171 | Google Chrome | artdecocode/window-info: Window Info is a readable stream that pushes data about windows on screen on MacOS. | 51791 |\n| 59 | iTunes | iTunes | 382 |\n| 4 | Window Server | Backstop Menubar | 177 |\n| 49 | Finder |  | 387 |\n| 41 | Dock | Desktop Picture - Sierra 2.jpg | 384 |\n| 2 | Window Server | Desktop | 177 |\n\n\n#### `destroy(): void`\n\nCall the `destroy` method to kill the underlying python process and end the stream.\n\n### `Data` Type\n\nEach data row in the read chunk contains information about open windows in form of an array.\n\nFor example, `WindowInfo` can generate the following:\n\n```js\n[\n  [480, \"Code\", \"example.js — window-info\", 405],\n  [89, \"Google Chrome\", \"Stream | Node.js v10.2.1 Documentation\", 410]\n]\n```\n\nThe type definition then is according to the position in the array.\n\n\u003ctable\u003e\n \u003cthead\u003e\n  \u003ctr\u003e\n   \u003cth\u003eProperty\u003c/th\u003e\n   \u003cth\u003eType\u003c/th\u003e\n   \u003cth\u003eDescription\u003c/th\u003e\n   \u003cth\u003eExample\u003c/th\u003e\n  \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n   \u003ctr\u003e\n  \u003ctd\u003e\u003ca name=\"winid\"\u003e\u003ccode\u003ewinid\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cem\u003enumber\u003c/em\u003e\u003c/td\u003e\n  \u003ctd\u003eposition 0\u003c/td\u003e\n  \u003ctd\u003e480\u003cbr/\u003e89\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca name=\"app-name\"\u003e\u003ccode\u003eApp Name\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n  \u003ctd\u003eposition 1\u003c/td\u003e\n  \u003ctd\u003eCode\u003cbr/\u003eGoogle Chrome\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca name=\"window-title\"\u003e\u003ccode\u003eWindow Title\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cem\u003estring\u003c/em\u003e\u003c/td\u003e\n  \u003ctd\u003eposition 2\u003c/td\u003e\n  \u003ctd\u003eexample.js — window-info\u003cbr/\u003eStream | Node.js v10.2.1 Documentation\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca name=\"pid\"\u003e\u003ccode\u003epid\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cem\u003enumber\u003c/em\u003e\u003c/td\u003e\n  \u003ctd\u003eposition 3\u003c/td\u003e\n  \u003ctd\u003e405\u003cbr\u003e410\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n---\n\n(c) [Art Deco][1] 2018\n\n[1]: https://artdeco.bz\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Fwindow-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartdecocode%2Fwindow-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartdecocode%2Fwindow-info/lists"}