{"id":26932433,"url":"https://github.com/foundata/chocolatey-usewindow.extension","last_synced_at":"2025-04-02T08:19:52.146Z","repository":{"id":172067218,"uuid":"646962565","full_name":"foundata/chocolatey-usewindow.extension","owner":"foundata","description":"A Chocolatey extension providing helper functions for querying and focusing windows. These functions may be used in Chocolatey install and uninstall scripts. The most important function is Use-Window, which is able to focus a window and bring it to the front.","archived":false,"fork":false,"pushed_at":"2025-02-17T15:21:57.000Z","size":47,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T13:09:21.603Z","etag":null,"topics":["automation","bringtofront","chocolatey","chocolatey-community-repository","focus","powershell","user32dll","window"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/foundata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/MIT.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-29T18:42:31.000Z","updated_at":"2025-02-20T23:30:09.000Z","dependencies_parsed_at":"2024-03-30T23:24:08.909Z","dependency_job_id":"f575e094-f416-43a6-8183-b74df3201ef6","html_url":"https://github.com/foundata/chocolatey-usewindow.extension","commit_stats":null,"previous_names":["foundata/chocolatey-usewindow.extension"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fchocolatey-usewindow.extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fchocolatey-usewindow.extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fchocolatey-usewindow.extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fchocolatey-usewindow.extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundata","download_url":"https://codeload.github.com/foundata/chocolatey-usewindow.extension/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777800,"owners_count":20832033,"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","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":["automation","bringtofront","chocolatey","chocolatey-community-repository","focus","powershell","user32dll","window"],"created_at":"2025-04-02T08:19:51.462Z","updated_at":"2025-04-02T08:19:52.131Z","avatar_url":"https://github.com/foundata.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use-Window extension for Chocolatey (helper to focus a window) (`usewindow.extension`)\n\n**This project is *not* associated with the official [Chocolatey](https://chocolatey.org/) product or team, nor with [Chocolatey Software, Inc.](https://chocolatey.org/contact/).**\n\nA [Chocolatey extension](https://docs.chocolatey.org/en-us/features/extensions) providing helper functions for querying and focusing windows. These functions may be used in Chocolatey install and uninstall scripts by declaring this package a dependency in your package's `.nuspec`.\n\nThe most important function is `Use-Window`, which is able to focus a window and bring it to the front. A script can easily switch between windows this way.\n\n\n## Installation\n\nAs the package is an extension, it gets usually installed automatically as a dependency. However, you can still install it manually:\n\n```console\nchoco install usewindow.extension\n```\n\n\n## Usage\n\nTo create a package with the ability to use a function from this extension, add the following to your `.nuspec` specification:\n\n```xml\n\u003cdependencies\u003e\n  \u003cdependency id=\"usewindow.extension\" version=\"REPLACE_WITH_MINIMUM_VERSION_USUALLY_CURRENT_LATEST\" /\u003e\n\u003c/dependencies\u003e\n```\n\nIt is possible to import the module directly in your `PS \u003e`, so you can try out the main functionality directly:\n\n```powershell\n# import the modules\nImport-Module \"${env:ChocolateyInstall}\\helpers\\chocolateyInstaller.psm1\"\nImport-Module \"${env:ChocolateyInstall}\\extensions\\usewindow\\*.psm1\"\n\n# get a list of all functions\nGet-Command -Module 'usewindow.extension'\n\n# get help and examples for a specific function\nGet-Help Use-Window -Detailed\nGet-Help Find-WindowHandle -Detailed\n\n# bring the first window that contains the name 'foo' to the front and focus it\nUse-Window 'foo'\n\n# bring the first window that equals the name 'foo' to the front and focus it\nUse-Window '^foo$'\n\n# bring the first window with the handle 101010, if it exist, to the front and focus it.\nUse-Window 101010\n\n# focus the window with the handle 202020, if it exists, to the front and focus it.\nUse-Window 'foo bar (202020)'\n```\n\nBut keep in mind that functions of Chocolatey extension may only work correctly in the context of Chocolatey install and uninstall scripts.\n\n\n## Licensing, copyright\n\n\u003c!--REUSE-IgnoreStart--\u003e\nCopyright (c) 2018 Grégoire Geis (https://github.com/71/Focus-Window/)\u003cbr\u003e\nCopyright (c) 2022 Refactoring UI Inc. (https://github.com/tailwindlabs/heroicons/blob/master/optimized/24/outline/window.svg)\u003cbr\u003e\nCopyright (c) 2023, 2024 foundata GmbH (https://foundata.com)\n\nThis project is licensed under the MIT License (SPDX-License-Identifier: `MIT`), see [`LICENSES/MIT.txt`](LICENSES/MIT.txt) for the full text.\n\nThe [`REUSE.toml`](REUSE.toml) file provides detailed licensing and copyright information in a human- and machine-readable format. This includes parts that may be subject to different licensing or usage terms, such as third-party components. The repository conforms to the [REUSE specification](https://reuse.software/spec/). You can use [`reuse spdx`](https://reuse.readthedocs.io/en/latest/readme.html#cli) to create a [SPDX software bill of materials (SBOM)](https://en.wikipedia.org/wiki/Software_Package_Data_Exchange).\n\u003c!--REUSE-IgnoreEnd--\u003e\n\n[![REUSE status](https://api.reuse.software/badge/github.com/foundata/chocolatey-usewindow.extension)](https://api.reuse.software/info/github.com/foundata/chocolatey-usewindow.extension)\n\n\n## Author information\n\nThis Chocolatey extension is maintained by [foundata](https://foundata.com/). If you like it, you might [buy them a coffee](https://buy-me-a.coffee/chocolatey-usewindow.extension/). This is a community project and *not* associated with the official [Chocolatey](https://chocolatey.org/) product or team, nor with [Chocolatey Software, Inc.](https://chocolatey.org/contact/). The core functionality is a fork of the [`Focus-Window`](https://github.com/71/Focus-Window/) PowerShell module by [Grégoire Geis](https://gregoirege.is/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundata%2Fchocolatey-usewindow.extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundata%2Fchocolatey-usewindow.extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundata%2Fchocolatey-usewindow.extension/lists"}